#include "main.h"

#ifndef _STANDALONE
#include "../SDK/amx/amx.h"
#include "../SDK/plugincommon.h"
#endif

#include "pool/class_pickuppool.h"
#include "script/func_amx.h"

//----------------------------------------------------------

#ifndef _STANDALONE

logprintf_t logprintf;

typedef CNetGame* (*getNetGame_t)();
getNetGame_t GetNetGame;

typedef CConsole* (*getConsole_t)();
getConsole_t GetConsole;


int ( __thiscall* CNetGame__RPC_SendToEveryPlayer )( uint32_t a_NetGame, uint32_t* a_Rpc, RakNet::BitStream* a_BitStream, uint16_t a_Broadcast, uint32_t a_Unknown ) = ( int ( __thiscall* )( uint32_t, uint32_t*, RakNet::BitStream*, uint16_t, uint32_t ) )0x00499020;
int ( __thiscall* CNetGame__RPC_SendToPlayer )( uint32_t a_NetGame, uint32_t* a_Rpc, RakNet::BitStream* a_BitStream, uint16_t a_Broadcast, uint32_t a_Unknown ) = ( int ( __thiscall* )( uint32_t, uint32_t*, RakNet::BitStream*, uint16_t, uint32_t ) )0x00499240;
int ( __thiscall* CNetGame__RPC_SendToStreamedPlayer )( uint32_t a_NetGame, uint32_t* a_Rpc, RakNet::BitStream* a_BitStream, uint16_t a_Broadcast, uint32_t a_Unknown ) = ( int ( __thiscall* )( uint32_t, uint32_t*, RakNet::BitStream*, uint16_t, uint32_t ) )0x004990D0;
int ( __thiscall* CNetGame__RPC_SendToPlayerVehicle )( uint32_t a_NetGame, uint32_t* a_Rpc, RakNet::BitStream* a_BitStream, uint16_t a_Broadcast, uint16_t a_Exclude, uint32_t a_Unknown ) = ( int ( __thiscall* )( uint32_t, uint32_t*, RakNet::BitStream*, uint16_t, uint16_t, uint32_t ) )0x00499180;

void **ppPluginData;
extern void *pAMXFunctions;

#endif

BOOL isGamemodeFinished = FALSE;

CPickupPool* __PickupPool = NULL;
CElementFactory* __ElementFactory = NULL;

CNetGame* __NetGame = NULL;
CConsole* __Console = NULL;
CPlugins* __Plugins = NULL;

void QuaternionToMatrix( float &quaterW, float &quaterX, float &quaterY, float &quaterZ, tVector* right, tVector* up, tVector* at )
{
	float SquarredQuaterW = 0.0f, SquarredQuaterX = 0.0f, SquarredQuaterY = 0.0f, SquarredQuaterZ = 0.0f;

	SquarredQuaterW = quaterW * quaterW;
	SquarredQuaterX = quaterX * quaterX;
	SquarredQuaterY = quaterY * quaterY;
	SquarredQuaterZ = quaterZ * quaterZ;
	right->X	= SquarredQuaterX - SquarredQuaterY - SquarredQuaterZ + SquarredQuaterW;
	up->Y		= SquarredQuaterY - SquarredQuaterX - SquarredQuaterZ + SquarredQuaterW;
	at->Z		= SquarredQuaterZ - (SquarredQuaterY + SquarredQuaterX) + SquarredQuaterW;

	float multXY = quaterX * quaterY;
	float multWZ = quaterW * quaterZ;
	up->X		= multWZ + multXY + multWZ + multXY;
	right->Y	= multXY - multWZ + multXY - multWZ;

	float multXZ = quaterX * quaterZ;
	float multWY = quaterW * quaterY;
	at->X		= multXZ - multWY + multXZ - multWY;
	right->Z	= multWY + multXZ + multWY + multXZ;

	float multYZ = quaterY * quaterZ;
	float multWX = quaterW * quaterX;
	at->Y = multWX + multYZ + multWX + multYZ;
	up->Z = multYZ - multWX + multYZ - multWX;
}



void QuaternionToMatrix( tQuaternionVector* quaternion, MATRIX4X4* matrix )
{
	QuaternionToMatrix( quaternion->W, quaternion->X, quaternion->Y, quaternion->Z,
		&matrix->right, &matrix->up, &matrix->at );
}

#ifndef WIN32
	#define _copysign copysign
#endif

void MatrixToQuaternion( tVector* right, tVector* up, tVector* at, float &quaterW, float &quaterX, float &quaterY, float &quaterZ ) // IDA POWA !
{
  long double v13; // st7@1
  long double v14; // st7@3
  long double v15; // st5@5
  float v16; // st6@5
  float v17; // st7@5
  long double v18; // st6@7
  int result = 0; // eax@17
  float v20; // ST28_8@17
  float v21; // ST10_8@17
  float v22; // st7@17
  float v23; // [sp+10h] [bp-20h]@7
  float v24; // [sp+18h] [bp-18h]@9
  float v25; // [sp+20h] [bp-10h]@3

  v13 = right->X + up->Y + at->Z + 1.0f;
  if ( v13 < 0.0f )
    v13 = 0.0f;
  v25 = (float)sqrt(v13) * 0.5f;
  v14 = right->X + 1.0 - up->Y - at->Z;
  if ( v14 < 0.0f)
    v14 = 0.0f;
  v17 = (float)sqrt(v14) * 0.5f;
  v16 = 1.0f - right->X;
  v15 = up->Y + v16 - at->Z;
  if ( v15 < 0.0f )
    v15 = 0.0f;
  v23 = (float)sqrt(v15) * 0.5f;
  v18 = v16 - up->Y + at->Z;
  if ( v18 < 0.0f )
    v18 = 0.0f;
  v24 = (float)sqrt(v18) * 0.5f;
  if ( v25 < 0.0f )
    v25 = 0.0f;
  if ( v17 < 0.0f )
    v17 = 0.0f;
  if ( v23 < 0.0f )
    v23 = 0.0f;
  if ( v24 < 0.0f )
    v24 = 0.0f;
  v20 = (float)_copysign(v17, at->Y - up->Z);
  v21 = (float)_copysign(v23, right->Z - at->X);
  v22 = (float)_copysign(v24, up->X - right->Y);
  quaterW = v25;
  quaterX = v20;
  quaterY = v21;
  quaterZ = v22;
}

void MatrixToQuaternion( MATRIX4X4* matrix, tQuaternionVector* quaternion )
{
	MatrixToQuaternion( &matrix->right, &matrix->up, &matrix->at, quaternion->W, quaternion->X, quaternion->Y, quaternion->Z );
}

char t_AnimationsName[ 1812 ][ 36 ] = {
 "", "AIRPORT:THRW_BARL_THRW", "ATTRACTORS:STEPSIT_IN", "ATTRACTORS:STEPSIT_LOOP", "ATTRACTORS:STEPSIT_OUT",
 "BAR:BARCUSTOM_GET", "BAR:BARCUSTOM_LOOP", "BAR:BARCUSTOM_ORDER", "BAR:BARMAN_IDLE", "BAR:BARSERVE_BOTTLE",
 "BAR:BARSERVE_GIVE", "BAR:BARSERVE_GLASS", "BAR:BARSERVE_IN", "BAR:BARSERVE_LOOP", "BAR:BARSERVE_ORDER",
 "BAR:DNK_STNDF_LOOP", "BAR:DNK_STNDM_LOOP", "BASEBALL:BAT_1", "BASEBALL:BAT_2", "BASEBALL:BAT_3",
 "BASEBALL:BAT_4", "BASEBALL:BAT_BLOCK", "BASEBALL:BAT_HIT_1", "BASEBALL:BAT_HIT_2", "BASEBALL:BAT_HIT_3",
 "BASEBALL:BAT_IDLE", "BASEBALL:BAT_M", "BASEBALL:BAT_PART", "BD_FIRE:BD_FIRE1", "BD_FIRE:BD_FIRE2",
 "BD_FIRE:BD_FIRE3", "BD_FIRE:BD_GF_WAVE", "BD_FIRE:BD_PANIC_01", "BD_FIRE:BD_PANIC_02", "BD_FIRE:BD_PANIC_03",
 "BD_FIRE:BD_PANIC_04", "BD_FIRE:BD_PANIC_LOOP", "BD_FIRE:GRLFRD_KISS_03", "BD_FIRE:M_SMKLEAN_LOOP", "BD_FIRE:PLAYA_KISS_03",
 "BD_FIRE:WASH_UP", "BEACH:BATHER", "BEACH:LAY_BAC_LOOP", "BEACH:PARKSIT_M_LOOP", "BEACH:PARKSIT_W_LOOP",
 "BEACH:SITNWAIT_LOOP_W", "BENCHPRESS:GYM_BP_CELEBRATE", "BENCHPRESS:GYM_BP_DOWN", "BENCHPRESS:GYM_BP_GETOFF", "BENCHPRESS:GYM_BP_GETON",
 "BENCHPRESS:GYM_BP_UP_A", "BENCHPRESS:GYM_BP_UP_B", "BENCHPRESS:GYM_BP_UP_SMOOTH", "BF_INJECTION:BF_GETIN_LHS", "BF_INJECTION:BF_GETIN_RHS",
 "BF_INJECTION:BF_GETOUT_LHS", "BF_INJECTION:BF_GETOUT_RHS", "BIKED:BIKED_BACK", "BIKED:BIKED_DRIVEBYFT", "BIKED:BIKED_DRIVEBYLHS",
 "BIKED:BIKED_DRIVEBYRHS", "BIKED:BIKED_FWD", "BIKED:BIKED_GETOFFBACK", "BIKED:BIKED_GETOFFLHS", "BIKED:BIKED_GETOFFRHS",
 "BIKED:BIKED_HIT", "BIKED:BIKED_JUMPONL", "BIKED:BIKED_JUMPONR", "BIKED:BIKED_KICK", "BIKED:BIKED_LEFT",
 "BIKED:BIKED_PASSENGER", "BIKED:BIKED_PUSHES", "BIKED:BIKED_RIDE", "BIKED:BIKED_RIGHT", "BIKED:BIKED_SHUFFLE",
 "BIKED:BIKED_STILL", "BIKEH:BIKEH_BACK", "BIKEH:BIKEH_DRIVEBYFT", "BIKEH:BIKEH_DRIVEBYLHS", "BIKEH:BIKEH_DRIVEBYRHS",
 "BIKEH:BIKEH_FWD", "BIKEH:BIKEH_GETOFFBACK", "BIKEH:BIKEH_GETOFFLHS", "BIKEH:BIKEH_GETOFFRHS", "BIKEH:BIKEH_HIT",
 "BIKEH:BIKEH_JUMPONL", "BIKEH:BIKEH_JUMPONR", "BIKEH:BIKEH_KICK", "BIKEH:BIKEH_LEFT", "BIKEH:BIKEH_PASSENGER",
 "BIKEH:BIKEH_PUSHES", "BIKEH:BIKEH_RIDE", "BIKEH:BIKEH_RIGHT", "BIKEH:BIKEH_STILL", "BIKELEAP:BK_BLNCE_IN",
 "BIKELEAP:BK_BLNCE_OUT", "BIKELEAP:BK_JMP", "BIKELEAP:BK_RDY_IN", "BIKELEAP:BK_RDY_OUT", "BIKELEAP:STRUGGLE_CESAR",
 "BIKELEAP:STRUGGLE_DRIVER", "BIKELEAP:TRUCK_DRIVER", "BIKELEAP:TRUCK_GETIN", "BIKES:BIKES_BACK", "BIKES:BIKES_DRIVEBYFT",
 "BIKES:BIKES_DRIVEBYLHS", "BIKES:BIKES_DRIVEBYRHS", "BIKES:BIKES_FWD", "BIKES:BIKES_GETOFFBACK", "BIKES:BIKES_GETOFFLHS",
 "BIKES:BIKES_GETOFFRHS", "BIKES:BIKES_HIT", "BIKES:BIKES_JUMPONL", "BIKES:BIKES_JUMPONR", "BIKES:BIKES_KICK",
 "BIKES:BIKES_LEFT", "BIKES:BIKES_PASSENGER", "BIKES:BIKES_PUSHES", "BIKES:BIKES_RIDE", "BIKES:BIKES_RIGHT",
 "BIKES:BIKES_SNATCH_L", "BIKES:BIKES_SNATCH_R", "BIKES:BIKES_STILL", "BIKEV:BIKEV_BACK", "BIKEV:BIKEV_DRIVEBYFT",
 "BIKEV:BIKEV_DRIVEBYLHS", "BIKEV:BIKEV_DRIVEBYRHS", "BIKEV:BIKEV_FWD", "BIKEV:BIKEV_GETOFFBACK", "BIKEV:BIKEV_GETOFFLHS",
 "BIKEV:BIKEV_GETOFFRHS", "BIKEV:BIKEV_HIT", "BIKEV:BIKEV_JUMPONL", "BIKEV:BIKEV_JUMPONR", "BIKEV:BIKEV_KICK",
 "BIKEV:BIKEV_LEFT", "BIKEV:BIKEV_PASSENGER", "BIKEV:BIKEV_PUSHES", "BIKEV:BIKEV_RIDE", "BIKEV:BIKEV_RIGHT",
 "BIKEV:BIKEV_STILL", "BIKE_DBZ:PASS_DRIVEBY_BWD", "BIKE_DBZ:PASS_DRIVEBY_FWD", "BIKE_DBZ:PASS_DRIVEBY_LHS", "BIKE_DBZ:PASS_DRIVEBY_RHS",
 "BMX:BMX_BACK", "BMX:BMX_BUNNYHOP", "BMX:BMX_DRIVEBYFT", "BMX:BMX_DRIVEBY_LHS", "BMX:BMX_DRIVEBY_RHS",
 "BMX:BMX_FWD", "BMX:BMX_GETOFFBACK", "BMX:BMX_GETOFFLHS", "BMX:BMX_GETOFFRHS", "BMX:BMX_JUMPONL",
 "BMX:BMX_JUMPONR", "BMX:BMX_LEFT", "BMX:BMX_PEDAL", "BMX:BMX_PUSHES", "BMX:BMX_RIDE",
 "BMX:BMX_RIGHT", "BMX:BMX_SPRINT", "BMX:BMX_STILL", "BOMBER:BOM_PLANT", "BOMBER:BOM_PLANT_2IDLE",
 "BOMBER:BOM_PLANT_CROUCH_IN", "BOMBER:BOM_PLANT_CROUCH_OUT", "BOMBER:BOM_PLANT_IN", "BOMBER:BOM_PLANT_LOOP", "BOX:BOXHIPIN",
 "BOX:BOXHIPUP", "BOX:BOXSHDWN", "BOX:BOXSHUP", "BOX:BXHIPWLK", "BOX:BXHWLKI",
 "BOX:BXSHWLK", "BOX:BXSHWLKI", "BOX:BXWLKO", "BOX:CATCH_BOX", "BSKTBALL:BBALL_DEF_JUMP_SHOT",
 "BSKTBALL:BBALL_DEF_LOOP", "BSKTBALL:BBALL_DEF_STEPL", "BSKTBALL:BBALL_DEF_STEPR", "BSKTBALL:BBALL_DNK", "BSKTBALL:BBALL_DNK_GLI",
 "BSKTBALL:BBALL_DNK_GLI_O", "BSKTBALL:BBALL_DNK_LNCH", "BSKTBALL:BBALL_DNK_LNCH_O", "BSKTBALL:BBALL_DNK_LND", "BSKTBALL:BBALL_DNK_O",
 "BSKTBALL:BBALL_IDLE", "BSKTBALL:BBALL_IDLE2", "BSKTBALL:BBALL_IDLE2_O", "BSKTBALL:BBALL_IDLELOOP", "BSKTBALL:BBALL_IDLELOOP_O",
 "BSKTBALL:BBALL_IDLE_O", "BSKTBALL:BBALL_JUMP_CANCEL", "BSKTBALL:BBALL_JUMP_CANCEL_O", "BSKTBALL:BBALL_JUMP_END", "BSKTBALL:BBALL_JUMP_SHOT",
 "BSKTBALL:BBALL_JUMP_SHOT_O", "BSKTBALL:BBALL_NET_DNK_O", "BSKTBALL:BBALL_PICKUP", "BSKTBALL:BBALL_PICKUP_O", "BSKTBALL:BBALL_REACT_MISS",
 "BSKTBALL:BBALL_REACT_SCORE", "BSKTBALL:BBALL_RUN", "BSKTBALL:BBALL_RUN_O", "BSKTBALL:BBALL_SKIDSTOP_L", "BSKTBALL:BBALL_SKIDSTOP_L_O",
 "BSKTBALL:BBALL_SKIDSTOP_R", "BSKTBALL:BBALL_SKIDSTOP_R_O", "BSKTBALL:BBALL_WALK", "BSKTBALL:BBALL_WALKSTOP_L", "BSKTBALL:BBALL_WALKSTOP_L_O",
 "BSKTBALL:BBALL_WALKSTOP_R", "BSKTBALL:BBALL_WALKSTOP_R_O", "BSKTBALL:BBALL_WALK_O", "BSKTBALL:BBALL_WALK_START", "BSKTBALL:BBALL_WALK_START_O",
 "BUDDY:BUDDY_CROUCHFIRE", "BUDDY:BUDDY_CROUCHRELOAD", "BUDDY:BUDDY_FIRE", "BUDDY:BUDDY_FIRE_POOR", "BUDDY:BUDDY_RELOAD",
 "BUS:BUS_CLOSE", "BUS:BUS_GETIN_LHS", "BUS:BUS_GETIN_RHS", "BUS:BUS_GETOUT_LHS", "BUS:BUS_GETOUT_RHS",
 "BUS:BUS_JACKED_LHS", "BUS:BUS_OPEN", "BUS:BUS_OPEN_RHS", "BUS:BUS_PULLOUT_LHS", "CAMERA:CAMCRCH_CMON",
 "CAMERA:CAMCRCH_IDLELOOP", "CAMERA:CAMCRCH_STAY", "CAMERA:CAMCRCH_TO_CAMSTND", "CAMERA:CAMSTND_CMON", "CAMERA:CAMSTND_IDLELOOP",
 "CAMERA:CAMSTND_LKABT", "CAMERA:CAMSTND_TO_CAMCRCH", "CAMERA:PICCRCH_IN", "CAMERA:PICCRCH_OUT", "CAMERA:PICCRCH_TAKE",
 "CAMERA:PICSTND_IN", "CAMERA:PICSTND_OUT", "CAMERA:PICSTND_TAKE", "CAR:FIXN_CAR_LOOP", "CAR:FIXN_CAR_OUT",
 "CAR:FLAG_DROP", "CAR:SIT_RELAXED", "CAR:TAP_HAND", "CAR:TYD2CAR_BUMP", "CAR:TYD2CAR_HIGH",
 "CAR:TYD2CAR_LOW", "CAR:TYD2CAR_MED", "CAR:TYD2CAR_TURNL", "CAR:TYD2CAR_TURNR", "CARRY:CRRY_PRTIAL",
 "CARRY:LIFTUP", "CARRY:LIFTUP05", "CARRY:LIFTUP105", "CARRY:PUTDWN", "CARRY:PUTDWN05",
 "CARRY:PUTDWN105", "CAR_CHAT:CARFONE_IN", "CAR_CHAT:CARFONE_LOOPA", "CAR_CHAT:CARFONE_LOOPA_TO_B", "CAR_CHAT:CARFONE_LOOPB",
 "CAR_CHAT:CARFONE_LOOPB_TO_A", "CAR_CHAT:CARFONE_OUT", "CAR_CHAT:CAR_SC1_BL", "CAR_CHAT:CAR_SC1_BR", "CAR_CHAT:CAR_SC1_FL",
 "CAR_CHAT:CAR_SC1_FR", "CAR_CHAT:CAR_SC2_FL", "CAR_CHAT:CAR_SC3_BR", "CAR_CHAT:CAR_SC3_FL", "CAR_CHAT:CAR_SC3_FR",
 "CAR_CHAT:CAR_SC4_BL", "CAR_CHAT:CAR_SC4_BR", "CAR_CHAT:CAR_SC4_FL", "CAR_CHAT:CAR_SC4_FR", "CAR_CHAT:CAR_TALKM_IN",
 "CAR_CHAT:CAR_TALKM_LOOP", "CAR_CHAT:CAR_TALKM_OUT", "CASINO:CARDS_IN", "CASINO:CARDS_LOOP", "CASINO:CARDS_LOSE",
 "CASINO:CARDS_OUT", "CASINO:CARDS_PICK_01", "CASINO:CARDS_PICK_02", "CASINO:CARDS_RAISE", "CASINO:CARDS_WIN",
 "CASINO:DEALONE", "CASINO:MANWINB", "CASINO:MANWIND", "CASINO:ROULETTE_BET", "CASINO:ROULETTE_IN",
 "CASINO:ROULETTE_LOOP", "CASINO:ROULETTE_LOSE", "CASINO:ROULETTE_OUT", "CASINO:ROULETTE_WIN", "CASINO:SLOT_BET_01",
 "CASINO:SLOT_BET_02", "CASINO:SLOT_IN", "CASINO:SLOT_LOSE_OUT", "CASINO:SLOT_PLYR", "CASINO:SLOT_WAIT",
 "CASINO:SLOT_WIN_OUT", "CASINO:WOF", "CHAINSAW:CSAW_1", "CHAINSAW:CSAW_2", "CHAINSAW:CSAW_3",
 "CHAINSAW:CSAW_G", "CHAINSAW:CSAW_HIT_1", "CHAINSAW:CSAW_HIT_2", "CHAINSAW:CSAW_HIT_3", "CHAINSAW:CSAW_PART",
 "CHAINSAW:IDLE_CSAW", "CHAINSAW:WEAPON_CSAW", "CHAINSAW:WEAPON_CSAWLO", "CHOPPA:CHOPPA_BACK", "CHOPPA:CHOPPA_BUNNYHOP",
 "CHOPPA:CHOPPA_DRIVEBYFT", "CHOPPA:CHOPPA_DRIVEBY_LHS", "CHOPPA:CHOPPA_DRIVEBY_RHS", "CHOPPA:CHOPPA_FWD", "CHOPPA:CHOPPA_GETOFFBACK",
 "CHOPPA:CHOPPA_GETOFFLHS", "CHOPPA:CHOPPA_GETOFFRHS", "CHOPPA:CHOPPA_JUMPONL", "CHOPPA:CHOPPA_JUMPONR", "CHOPPA:CHOPPA_LEFT",
 "CHOPPA:CHOPPA_PEDAL", "CHOPPA:CHOPPA_PUSHES", "CHOPPA:CHOPPA_RIDE", "CHOPPA:CHOPPA_RIGHT", "CHOPPA:CHOPPA_SPRINT",
 "CHOPPA:CHOPPA_STILL", "CLOTHES:CLO_BUY", "CLOTHES:CLO_IN", "CLOTHES:CLO_OUT", "CLOTHES:CLO_POSE_HAT",
 "CLOTHES:CLO_POSE_IN", "CLOTHES:CLO_POSE_IN_O", "CLOTHES:CLO_POSE_LEGS", "CLOTHES:CLO_POSE_LOOP", "CLOTHES:CLO_POSE_OUT",
 "CLOTHES:CLO_POSE_OUT_O", "CLOTHES:CLO_POSE_SHOES", "CLOTHES:CLO_POSE_TORSO", "CLOTHES:CLO_POSE_WATCH", "COACH:COACH_INL",
 "COACH:COACH_INR", "COACH:COACH_OPNL", "COACH:COACH_OPNR", "COACH:COACH_OUTL", "COACH:COACH_OUTR",
 "COLT45:2GUNS_CROUCHFIRE", "COLT45:COLT45_CROUCHFIRE", "COLT45:COLT45_CROUCHRELOAD", "COLT45:COLT45_FIRE", "COLT45:COLT45_FIRE_2HANDS",
 "COLT45:COLT45_RELOAD", "COLT45:SAWNOFF_RELOAD", "COP_AMBIENT:COPBROWSE_IN", "COP_AMBIENT:COPBROWSE_LOOP", "COP_AMBIENT:COPBROWSE_NOD",
 "COP_AMBIENT:COPBROWSE_OUT", "COP_AMBIENT:COPBROWSE_SHAKE", "COP_AMBIENT:COPLOOK_IN", "COP_AMBIENT:COPLOOK_LOOP", "COP_AMBIENT:COPLOOK_NOD",
 "COP_AMBIENT:COPLOOK_OUT", "COP_AMBIENT:COPLOOK_SHAKE", "COP_AMBIENT:COPLOOK_THINK", "COP_AMBIENT:COPLOOK_WATCH", "COP_DVBYZ:COP_DVBY_B",
 "COP_DVBYZ:COP_DVBY_FT", "COP_DVBYZ:COP_DVBY_L", "COP_DVBYZ:COP_DVBY_R", "CRACK:BBALBAT_IDLE_01", "CRACK:BBALBAT_IDLE_02",
 "CRACK:CRCKDETH1", "CRACK:CRCKDETH2", "CRACK:CRCKDETH3", "CRACK:CRCKDETH4", "CRACK:CRCKIDLE1",
 "CRACK:CRCKIDLE2", "CRACK:CRCKIDLE3", "CRACK:CRCKIDLE4", "CRIB:CRIB_CONSOLE_LOOP", "CRIB:CRIB_USE_SWITCH",
 "CRIB:PED_CONSOLE_LOOP", "CRIB:PED_CONSOLE_LOOSE", "CRIB:PED_CONSOLE_WIN", "DAM_JUMP:DAM_DIVE_LOOP", "DAM_JUMP:DAM_LAND",
 "DAM_JUMP:DAM_LAUNCH", "DAM_JUMP:JUMP_ROLL", "DAM_JUMP:SF_JUMPWALL", "DANCING:BD_CLAP", "DANCING:BD_CLAP1",
 "DANCING:DANCE_LOOP", "DANCING:DAN_DOWN_A", "DANCING:DAN_LEFT_A", "DANCING:DAN_LOOP_A", "DANCING:DAN_RIGHT_A",
 "DANCING:DAN_UP_A", "DANCING:DNCE_M_A", "DANCING:DNCE_M_B", "DANCING:DNCE_M_C", "DANCING:DNCE_M_D",
 "DANCING:DNCE_M_E", "DEALER:DEALER_DEAL", "DEALER:DEALER_IDLE", "DEALER:DEALER_IDLE_01", "DEALER:DEALER_IDLE_02",
 "DEALER:DEALER_IDLE_03", "DEALER:DRUGS_BUY", "DEALER:SHOP_PAY", "DILDO:DILDO_1", "DILDO:DILDO_2",
 "DILDO:DILDO_3", "DILDO:DILDO_BLOCK", "DILDO:DILDO_G", "DILDO:DILDO_HIT_1", "DILDO:DILDO_HIT_2",
 "DILDO:DILDO_HIT_3", "DILDO:DILDO_IDLE", "DODGE:COVER_DIVE_01", "DODGE:COVER_DIVE_02", "DODGE:CRUSHED",
 "DODGE:CRUSH_JUMP", "DOZER:DOZER_ALIGN_LHS", "DOZER:DOZER_ALIGN_RHS", "DOZER:DOZER_GETIN_LHS", "DOZER:DOZER_GETIN_RHS",
 "DOZER:DOZER_GETOUT_LHS", "DOZER:DOZER_GETOUT_RHS", "DOZER:DOZER_JACKED_LHS", "DOZER:DOZER_JACKED_RHS", "DOZER:DOZER_PULLOUT_LHS",
 "DOZER:DOZER_PULLOUT_RHS", "DRIVEBYS:GANG_DRIVEBYLHS", "DRIVEBYS:GANG_DRIVEBYLHS_BWD", "DRIVEBYS:GANG_DRIVEBYLHS_FWD", "DRIVEBYS:GANG_DRIVEBYRHS",
 "DRIVEBYS:GANG_DRIVEBYRHS_BWD", "DRIVEBYS:GANG_DRIVEBYRHS_FWD", "DRIVEBYS:GANG_DRIVEBYTOP_LHS", "DRIVEBYS:GANG_DRIVEBYTOP_RHS", "FAT:FATIDLE",
 "FAT:FATIDLE_ARMED", "FAT:FATIDLE_CSAW", "FAT:FATIDLE_ROCKET", "FAT:FATRUN", "FAT:FATRUN_ARMED",
 "FAT:FATRUN_CSAW", "FAT:FATRUN_ROCKET", "FAT:FATSPRINT", "FAT:FATWALK", "FAT:FATWALKSTART",
 "FAT:FATWALKSTART_CSAW", "FAT:FATWALKST_ARMED", "FAT:FATWALKST_ROCKET", "FAT:FATWALK_ARMED", "FAT:FATWALK_CSAW",
 "FAT:FATWALK_ROCKET", "FAT:IDLE_TIRED", "FIGHT_B:FIGHTB_1", "FIGHT_B:FIGHTB_2", "FIGHT_B:FIGHTB_3",
 "FIGHT_B:FIGHTB_BLOCK", "FIGHT_B:FIGHTB_G", "FIGHT_B:FIGHTB_IDLE", "FIGHT_B:FIGHTB_M", "FIGHT_B:HITB_1",
 "FIGHT_B:HITB_2", "FIGHT_B:HITB_3", "FIGHT_C:FIGHTC_1", "FIGHT_C:FIGHTC_2", "FIGHT_C:FIGHTC_3",
 "FIGHT_C:FIGHTC_BLOCK", "FIGHT_C:FIGHTC_BLOCKING", "FIGHT_C:FIGHTC_G", "FIGHT_C:FIGHTC_IDLE", "FIGHT_C:FIGHTC_M",
 "FIGHT_C:FIGHTC_SPAR", "FIGHT_C:HITC_1", "FIGHT_C:HITC_2", "FIGHT_C:HITC_3", "FIGHT_D:FIGHTD_1",
 "FIGHT_D:FIGHTD_2", "FIGHT_D:FIGHTD_3", "FIGHT_D:FIGHTD_BLOCK", "FIGHT_D:FIGHTD_G", "FIGHT_D:FIGHTD_IDLE",
 "FIGHT_D:FIGHTD_M", "FIGHT_D:HITD_1", "FIGHT_D:HITD_2", "FIGHT_D:HITD_3", "FIGHT_E:FIGHTKICK",
 "FIGHT_E:FIGHTKICK_B", "FIGHT_E:HIT_FIGHTKICK", "FIGHT_E:HIT_FIGHTKICK_B", "FINALE:FIN_CLIMB_IN", "FINALE:FIN_COP1_CLIMBOUT2",
 "FINALE:FIN_COP1_LOOP", "FINALE:FIN_COP1_STOMP", "FINALE:FIN_HANG_L", "FINALE:FIN_HANG_LOOP", "FINALE:FIN_HANG_R",
 "FINALE:FIN_HANG_SLIP", "FINALE:FIN_JUMP_ON", "FINALE:FIN_LAND_CAR", "FINALE:FIN_LAND_DIE", "FINALE:FIN_LEGSUP",
 "FINALE:FIN_LEGSUP_L", "FINALE:FIN_LEGSUP_LOOP", "FINALE:FIN_LEGSUP_R", "FINALE:FIN_LET_GO", "FINALE2:FIN_COP1_CLIMBOUT",
 "FINALE2:FIN_COP1_FALL", "FINALE2:FIN_COP1_LOOP", "FINALE2:FIN_COP1_SHOT", "FINALE2:FIN_COP1_SWING", "FINALE2:FIN_COP2_CLIMBOUT",
 "FINALE2:FIN_SWITCH_P", "FINALE2:FIN_SWITCH_S", "FLAME:FLAME_FIRE", "FLOWERS:FLOWER_ATTACK", "FLOWERS:FLOWER_ATTACK_M",
 "FLOWERS:FLOWER_HIT", "FOOD:EAT_BURGER", "FOOD:EAT_CHICKEN", "FOOD:EAT_PIZZA", "FOOD:EAT_VOMIT_P",
 "FOOD:EAT_VOMIT_SK", "FOOD:FF_DAM_BKW", "FOOD:FF_DAM_FWD", "FOOD:FF_DAM_LEFT", "FOOD:FF_DAM_RIGHT",
 "FOOD:FF_DIE_BKW", "FOOD:FF_DIE_FWD", "FOOD:FF_DIE_LEFT", "FOOD:FF_DIE_RIGHT", "FOOD:FF_SIT_EAT1",
 "FOOD:FF_SIT_EAT2", "FOOD:FF_SIT_EAT3", "FOOD:FF_SIT_IN", "FOOD:FF_SIT_IN_L", "FOOD:FF_SIT_IN_R",
 "FOOD:FF_SIT_LOOK", "FOOD:FF_SIT_LOOP", "FOOD:FF_SIT_OUT_180", "FOOD:FF_SIT_OUT_L_180", "FOOD:FF_SIT_OUT_R_180",
 "FOOD:SHP_THANK", "FOOD:SHP_TRAY_IN", "FOOD:SHP_TRAY_LIFT", "FOOD:SHP_TRAY_LIFT_IN", "FOOD:SHP_TRAY_LIFT_LOOP",
 "FOOD:SHP_TRAY_LIFT_OUT", "FOOD:SHP_TRAY_OUT", "FOOD:SHP_TRAY_POSE", "FOOD:SHP_TRAY_RETURN", "FREEWEIGHTS:GYM_BARBELL",
 "FREEWEIGHTS:GYM_FREE_A", "FREEWEIGHTS:GYM_FREE_B", "FREEWEIGHTS:GYM_FREE_CELEBRATE", "FREEWEIGHTS:GYM_FREE_DOWN", "FREEWEIGHTS:GYM_FREE_LOOP",
 "FREEWEIGHTS:GYM_FREE_PICKUP", "FREEWEIGHTS:GYM_FREE_PUTDOWN", "FREEWEIGHTS:GYM_FREE_UP_SMOOTH", "GANGS:DEALER_DEAL", "GANGS:DEALER_IDLE",
 "GANGS:DRNKBR_PRTL", "GANGS:DRNKBR_PRTL_F", "GANGS:DRUGS_BUY", "GANGS:HNDSHKAA", "GANGS:HNDSHKBA",
 "GANGS:HNDSHKCA", "GANGS:HNDSHKCB", "GANGS:HNDSHKDA", "GANGS:HNDSHKEA", "GANGS:HNDSHKFA",
 "GANGS:HNDSHKFA_SWT", "GANGS:INVITE_NO", "GANGS:INVITE_YES", "GANGS:LEANIDLE", "GANGS:LEANIN",
 "GANGS:LEANOUT", "GANGS:PRTIAL_GNGTLKA", "GANGS:PRTIAL_GNGTLKB", "GANGS:PRTIAL_GNGTLKC", "GANGS:PRTIAL_GNGTLKD",
 "GANGS:PRTIAL_GNGTLKE", "GANGS:PRTIAL_GNGTLKF", "GANGS:PRTIAL_GNGTLKG", "GANGS:PRTIAL_GNGTLKH", "GANGS:PRTIAL_HNDSHK_01",
 "GANGS:PRTIAL_HNDSHK_BIZ_01", "GANGS:SHAKE_CARA", "GANGS:SHAKE_CARK", "GANGS:SHAKE_CARSH", "GANGS:SMKCIG_PRTL",
 "GANGS:SMKCIG_PRTL_F", "GHANDS:GSIGN1", "GHANDS:GSIGN1LH", "GHANDS:GSIGN2", "GHANDS:GSIGN2LH",
 "GHANDS:GSIGN3", "GHANDS:GSIGN3LH", "GHANDS:GSIGN4", "GHANDS:GSIGN4LH", "GHANDS:GSIGN5",
 "GHANDS:GSIGN5LH", "GHANDS:LHGSIGN1", "GHANDS:LHGSIGN2", "GHANDS:LHGSIGN3", "GHANDS:LHGSIGN4",
 "GHANDS:LHGSIGN5", "GHANDS:RHGSIGN1", "GHANDS:RHGSIGN2", "GHANDS:RHGSIGN3", "GHANDS:RHGSIGN4",
 "GHANDS:RHGSIGN5", "GHETTO_DB:GDB_CAR2_PLY", "GHETTO_DB:GDB_CAR2_SMO", "GHETTO_DB:GDB_CAR2_SWE", "GHETTO_DB:GDB_CAR_PLY",
 "GHETTO_DB:GDB_CAR_RYD", "GHETTO_DB:GDB_CAR_SMO", "GHETTO_DB:GDB_CAR_SWE", "GOGGLES:GOGGLES_PUT_ON", "GRAFFITI:GRAFFITI_CHKOUT",
 "GRAFFITI:SPRAYCAN_FIRE", "GRAVEYARD:MRNF_LOOP", "GRAVEYARD:MRNM_LOOP", "GRAVEYARD:PRST_LOOPA", "GRENADE:WEAPON_START_THROW",
 "GRENADE:WEAPON_THROW", "GRENADE:WEAPON_THROWU", "GYMNASIUM:GYMSHADOWBOX", "GYMNASIUM:GYM_BIKE_CELEBRATE", "GYMNASIUM:GYM_BIKE_FAST",
 "GYMNASIUM:GYM_BIKE_FASTER", "GYMNASIUM:GYM_BIKE_GETOFF", "GYMNASIUM:GYM_BIKE_GETON", "GYMNASIUM:GYM_BIKE_PEDAL", "GYMNASIUM:GYM_BIKE_SLOW",
 "GYMNASIUM:GYM_BIKE_STILL", "GYMNASIUM:GYM_JOG_FALLOFF", "GYMNASIUM:GYM_SHADOWBOX", "GYMNASIUM:GYM_TREAD_CELEBRATE", "GYMNASIUM:GYM_TREAD_FALLOFF",
 "GYMNASIUM:GYM_TREAD_GETOFF", "GYMNASIUM:GYM_TREAD_GETON", "GYMNASIUM:GYM_TREAD_JOG", "GYMNASIUM:GYM_TREAD_SPRINT", "GYMNASIUM:GYM_TREAD_TIRED",
 "GYMNASIUM:GYM_TREAD_WALK", "GYMNASIUM:GYM_WALK_FALLOFF", "GYMNASIUM:PEDALS_FAST", "GYMNASIUM:PEDALS_MED", "GYMNASIUM:PEDALS_SLOW",
 "GYMNASIUM:PEDALS_STILL", "HAIRCUTS:BRB_BEARD_01", "HAIRCUTS:BRB_BUY", "HAIRCUTS:BRB_CUT", "HAIRCUTS:BRB_CUT_IN",
 "HAIRCUTS:BRB_CUT_OUT", "HAIRCUTS:BRB_HAIR_01", "HAIRCUTS:BRB_HAIR_02", "HAIRCUTS:BRB_IN", "HAIRCUTS:BRB_LOOP",
 "HAIRCUTS:BRB_OUT", "HAIRCUTS:BRB_SIT_IN", "HAIRCUTS:BRB_SIT_LOOP", "HAIRCUTS:BRB_SIT_OUT", "HEIST9:CAS_G2_GASKO",
 "HEIST9:SWT_WLLPK_L", "HEIST9:SWT_WLLPK_L_BACK", "HEIST9:SWT_WLLPK_R", "HEIST9:SWT_WLLPK_R_BACK", "HEIST9:SWT_WLLSHOOT_IN_L",
 "HEIST9:SWT_WLLSHOOT_IN_R", "HEIST9:SWT_WLLSHOOT_OUT_L", "HEIST9:SWT_WLLSHOOT_OUT_R", "HEIST9:USE_SWIPECARD", "INT_HOUSE:BED_IN_L",
 "INT_HOUSE:BED_IN_R", "INT_HOUSE:BED_LOOP_L", "INT_HOUSE:BED_LOOP_R", "INT_HOUSE:BED_OUT_L", "INT_HOUSE:BED_OUT_R",
 "INT_HOUSE:LOU_IN", "INT_HOUSE:LOU_LOOP", "INT_HOUSE:LOU_OUT", "INT_HOUSE:WASH_UP", "INT_OFFICE:FF_DAM_FWD",
 "INT_OFFICE:OFF_SIT_2IDLE_180", "INT_OFFICE:OFF_SIT_BORED_LOOP", "INT_OFFICE:OFF_SIT_CRASH", "INT_OFFICE:OFF_SIT_DRINK", "INT_OFFICE:OFF_SIT_IDLE_LOOP",
 "INT_OFFICE:OFF_SIT_IN", "INT_OFFICE:OFF_SIT_READ", "INT_OFFICE:OFF_SIT_TYPE_LOOP", "INT_OFFICE:OFF_SIT_WATCH", "INT_SHOP:SHOP_CASHIER",
 "INT_SHOP:SHOP_IN", "INT_SHOP:SHOP_LOOKA", "INT_SHOP:SHOP_LOOKB", "INT_SHOP:SHOP_LOOP", "INT_SHOP:SHOP_OUT",
 "INT_SHOP:SHOP_PAY", "INT_SHOP:SHOP_SHELF", "JST_BUISNESS:GIRL_01", "JST_BUISNESS:GIRL_02", "JST_BUISNESS:PLAYER_01",
 "JST_BUISNESS:SMOKE_01", "KART:KART_GETIN_LHS", "KART:KART_GETIN_RHS", "KART:KART_GETOUT_LHS", "KART:KART_GETOUT_RHS",
 "KISSING:BD_GF_WAVE", "KISSING:GFWAVE2", "KISSING:GF_CARARGUE_01", "KISSING:GF_CARARGUE_02", "KISSING:GF_CARSPOT",
 "KISSING:GF_STREETARGUE_01", "KISSING:GF_STREETARGUE_02", "KISSING:GIFT_GET", "KISSING:GIFT_GIVE", "KISSING:GRLFRD_KISS_01",
 "KISSING:GRLFRD_KISS_02", "KISSING:GRLFRD_KISS_03", "KISSING:PLAYA_KISS_01", "KISSING:PLAYA_KISS_02", "KISSING:PLAYA_KISS_03",
 "KNIFE:KILL_KNIFE_PED_DAMAGE", "KNIFE:KILL_KNIFE_PED_DIE", "KNIFE:KILL_KNIFE_PLAYER", "KNIFE:KILL_PARTIAL", "KNIFE:KNIFE_1",
 "KNIFE:KNIFE_2", "KNIFE:KNIFE_3", "KNIFE:KNIFE_4", "KNIFE:KNIFE_BLOCK", "KNIFE:KNIFE_G",
 "KNIFE:KNIFE_HIT_1", "KNIFE:KNIFE_HIT_2", "KNIFE:KNIFE_HIT_3", "KNIFE:KNIFE_IDLE", "KNIFE:KNIFE_PART",
 "KNIFE:WEAPON_KNIFEIDLE", "LAPDAN1:LAPDAN_D", "LAPDAN1:LAPDAN_P", "LAPDAN2:LAPDAN_D", "LAPDAN2:LAPDAN_P",
 "LAPDAN3:LAPDAN_D", "LAPDAN3:LAPDAN_P", "LOWRIDER:F_SMKLEAN_LOOP", "LOWRIDER:LRGIRL_BDBNCE", "LOWRIDER:LRGIRL_HAIR",
 "LOWRIDER:LRGIRL_HURRY", "LOWRIDER:LRGIRL_IDLELOOP", "LOWRIDER:LRGIRL_IDLE_TO_L0", "LOWRIDER:LRGIRL_L0_BNCE", "LOWRIDER:LRGIRL_L0_LOOP",
 "LOWRIDER:LRGIRL_L0_TO_L1", "LOWRIDER:LRGIRL_L12_TO_L0", "LOWRIDER:LRGIRL_L1_BNCE", "LOWRIDER:LRGIRL_L1_LOOP", "LOWRIDER:LRGIRL_L1_TO_L2",
 "LOWRIDER:LRGIRL_L2_BNCE", "LOWRIDER:LRGIRL_L2_LOOP", "LOWRIDER:LRGIRL_L2_TO_L3", "LOWRIDER:LRGIRL_L345_TO_L1", "LOWRIDER:LRGIRL_L3_BNCE",
 "LOWRIDER:LRGIRL_L3_LOOP", "LOWRIDER:LRGIRL_L3_TO_L4", "LOWRIDER:LRGIRL_L4_BNCE", "LOWRIDER:LRGIRL_L4_LOOP", "LOWRIDER:LRGIRL_L4_TO_L5",
 "LOWRIDER:LRGIRL_L5_BNCE", "LOWRIDER:LRGIRL_L5_LOOP", "LOWRIDER:M_SMKLEAN_LOOP", "LOWRIDER:M_SMKSTND_LOOP", "LOWRIDER:PRTIAL_GNGTLKB",
 "LOWRIDER:PRTIAL_GNGTLKC", "LOWRIDER:PRTIAL_GNGTLKD", "LOWRIDER:PRTIAL_GNGTLKE", "LOWRIDER:PRTIAL_GNGTLKF", "LOWRIDER:PRTIAL_GNGTLKG",
 "LOWRIDER:PRTIAL_GNGTLKH", "LOWRIDER:RAP_A_LOOP", "LOWRIDER:RAP_B_LOOP", "LOWRIDER:RAP_C_LOOP", "LOWRIDER:SIT_RELAXED",
 "LOWRIDER:TAP_HAND", "MD_CHASE:CARHIT_HANGON", "MD_CHASE:CARHIT_TUMBLE", "MD_CHASE:DONUTDROP", "MD_CHASE:FEN_CHOPPA_L1",
 "MD_CHASE:FEN_CHOPPA_L2", "MD_CHASE:FEN_CHOPPA_L3", "MD_CHASE:FEN_CHOPPA_R1", "MD_CHASE:FEN_CHOPPA_R2", "MD_CHASE:FEN_CHOPPA_R3",
 "MD_CHASE:HANGON_STUN_LOOP", "MD_CHASE:HANGON_STUN_TURN", "MD_CHASE:MD_BIKE_2_HANG", "MD_CHASE:MD_BIKE_JMP_BL", "MD_CHASE:MD_BIKE_JMP_F",
 "MD_CHASE:MD_BIKE_LND_BL", "MD_CHASE:MD_BIKE_LND_DIE_BL", "MD_CHASE:MD_BIKE_LND_DIE_F", "MD_CHASE:MD_BIKE_LND_F", "MD_CHASE:MD_BIKE_LND_ROLL",
 "MD_CHASE:MD_BIKE_LND_ROLL_F", "MD_CHASE:MD_BIKE_PUNCH", "MD_CHASE:MD_BIKE_PUNCH_F", "MD_CHASE:MD_BIKE_SHOT_F", "MD_CHASE:MD_HANG_LND_ROLL",
 "MD_CHASE:MD_HANG_LOOP", "MD_END:END_SC1_PLY", "MD_END:END_SC1_RYD", "MD_END:END_SC1_SMO", "MD_END:END_SC1_SWE",
 "MD_END:END_SC2_PLY", "MD_END:END_SC2_RYD", "MD_END:END_SC2_SMO", "MD_END:END_SC2_SWE", "MEDIC:CPR",
 "MISC:BITCHSLAP", "MISC:BMX_CELEBRATE", "MISC:BMX_COMEON", "MISC:BMX_IDLELOOP_01", "MISC:BMX_IDLELOOP_02",
 "MISC:BMX_TALKLEFT_IN", "MISC:BMX_TALKLEFT_LOOP", "MISC:BMX_TALKLEFT_OUT", "MISC:BMX_TALKRIGHT_IN", "MISC:BMX_TALKRIGHT_LOOP",
 "MISC:BMX_TALKRIGHT_OUT", "MISC:BNG_WNDW", "MISC:BNG_WNDW_02", "MISC:CASE_PICKUP", "MISC:DOOR_JET",
 "MISC:GRAB_L", "MISC:GRAB_R", "MISC:HIKER_POSE", "MISC:HIKER_POSE_L", "MISC:IDLE_CHAT_02",
 "MISC:KAT_THROW_K", "MISC:KAT_THROW_O", "MISC:KAT_THROW_P", "MISC:PASS_RIFLE_O", "MISC:PASS_RIFLE_PED",
 "MISC:PASS_RIFLE_PLY", "MISC:PICKUP_BOX", "MISC:PLANE_DOOR", "MISC:PLANE_EXIT", "MISC:PLANE_HIJACK",
 "MISC:PLUNGER_01", "MISC:PLYRLEAN_LOOP", "MISC:PLYR_SHKHEAD", "MISC:RUN_DIVE", "MISC:SCRATCHBALLS_01",
 "MISC:SEAT_LR", "MISC:SEAT_TALK_01", "MISC:SEAT_TALK_02", "MISC:SEAT_WATCH", "MISC:SMALPLANE_DOOR",
 "MISC:SMLPLANE_DOOR", "MTB:MTB_BACK", "MTB:MTB_BUNNYHOP", "MTB:MTB_DRIVEBYFT", "MTB:MTB_DRIVEBY_LHS",
 "MTB:MTB_DRIVEBY_RHS", "MTB:MTB_FWD", "MTB:MTB_GETOFFBACK", "MTB:MTB_GETOFFLHS", "MTB:MTB_GETOFFRHS",
 "MTB:MTB_JUMPONL", "MTB:MTB_JUMPONR", "MTB:MTB_LEFT", "MTB:MTB_PEDAL", "MTB:MTB_PUSHES",
 "MTB:MTB_RIDE", "MTB:MTB_RIGHT", "MTB:MTB_SPRINT", "MTB:MTB_STILL", "MUSCULAR:MSCLEWALKST_ARMED",
 "MUSCULAR:MSCLEWALKST_CSAW", "MUSCULAR:MSCLE_RCKT_RUN", "MUSCULAR:MSCLE_RCKT_WALKST", "MUSCULAR:MSCLE_RUN_CSAW", "MUSCULAR:MUSCLEIDLE",
 "MUSCULAR:MUSCLEIDLE_ARMED", "MUSCULAR:MUSCLEIDLE_CSAW", "MUSCULAR:MUSCLEIDLE_ROCKET", "MUSCULAR:MUSCLERUN", "MUSCULAR:MUSCLERUN_ARMED",
 "MUSCULAR:MUSCLESPRINT", "MUSCULAR:MUSCLEWALK", "MUSCULAR:MUSCLEWALKSTART", "MUSCULAR:MUSCLEWALK_ARMED", "MUSCULAR:MUSCLEWALK_CSAW",
 "MUSCULAR:MUSCLEWALK_ROCKET", "NEVADA:NEVADA_GETIN", "NEVADA:NEVADA_GETOUT", "ON_LOOKERS:LKAROUND_IN", "ON_LOOKERS:LKAROUND_LOOP",
 "ON_LOOKERS:LKAROUND_OUT", "ON_LOOKERS:LKUP_IN", "ON_LOOKERS:LKUP_LOOP", "ON_LOOKERS:LKUP_OUT", "ON_LOOKERS:LKUP_POINT",
 "ON_LOOKERS:PANIC_COWER", "ON_LOOKERS:PANIC_HIDE", "ON_LOOKERS:PANIC_IN", "ON_LOOKERS:PANIC_LOOP", "ON_LOOKERS:PANIC_OUT",
 "ON_LOOKERS:PANIC_POINT", "ON_LOOKERS:PANIC_SHOUT", "ON_LOOKERS:POINTUP_IN", "ON_LOOKERS:POINTUP_LOOP", "ON_LOOKERS:POINTUP_OUT",
 "ON_LOOKERS:POINTUP_SHOUT", "ON_LOOKERS:POINT_IN", "ON_LOOKERS:POINT_LOOP", "ON_LOOKERS:POINT_OUT", "ON_LOOKERS:SHOUT_01",
 "ON_LOOKERS:SHOUT_02", "ON_LOOKERS:SHOUT_IN", "ON_LOOKERS:SHOUT_LOOP", "ON_LOOKERS:SHOUT_OUT", "ON_LOOKERS:WAVE_IN",
 "ON_LOOKERS:WAVE_LOOP", "ON_LOOKERS:WAVE_OUT", "OTB:BETSLP_IN", "OTB:BETSLP_LKABT", "OTB:BETSLP_LOOP",
 "OTB:BETSLP_OUT", "OTB:BETSLP_TNK", "OTB:WTCHRACE_CMON", "OTB:WTCHRACE_IN", "OTB:WTCHRACE_LOOP",
 "OTB:WTCHRACE_LOSE", "OTB:WTCHRACE_OUT", "OTB:WTCHRACE_WIN", "PARACHUTE:FALL_SKYDIVE", "PARACHUTE:FALL_SKYDIVE_ACCEL",
 "PARACHUTE:FALL_SKYDIVE_DIE", "PARACHUTE:FALL_SKYDIVE_L", "PARACHUTE:FALL_SKYDIVE_R", "PARACHUTE:PARA_DECEL", "PARACHUTE:PARA_DECEL_O",
 "PARACHUTE:PARA_FLOAT", "PARACHUTE:PARA_FLOAT_O", "PARACHUTE:PARA_LAND", "PARACHUTE:PARA_LAND_O", "PARACHUTE:PARA_LAND_WATER",
 "PARACHUTE:PARA_LAND_WATER_O", "PARACHUTE:PARA_OPEN", "PARACHUTE:PARA_OPEN_O", "PARACHUTE:PARA_RIP_LAND_O", "PARACHUTE:PARA_RIP_LOOP_O",
 "PARACHUTE:PARA_RIP_O", "PARACHUTE:PARA_STEERL", "PARACHUTE:PARA_STEERL_O", "PARACHUTE:PARA_STEERR", "PARACHUTE:PARA_STEERR_O",
 "PARK:TAI_CHI_IN", "PARK:TAI_CHI_LOOP", "PARK:TAI_CHI_OUT", "PAULNMAC:PISS_IN", "PAULNMAC:PISS_LOOP",
 "PAULNMAC:PISS_OUT", "PAULNMAC:PNM_ARGUE1_A", "PAULNMAC:PNM_ARGUE1_B", "PAULNMAC:PNM_ARGUE2_A", "PAULNMAC:PNM_ARGUE2_B",
 "PAULNMAC:PNM_LOOP_A", "PAULNMAC:PNM_LOOP_B", "PAULNMAC:WANK_IN", "PAULNMAC:WANK_LOOP", "PAULNMAC:WANK_OUT",
 "PED:ABSEIL", "PED:ARRESTGUN", "PED:ATM", "PED:BIKE_ELBOWL", "PED:BIKE_ELBOWR",
 "PED:BIKE_FALLR", "PED:BIKE_FALL_OFF", "PED:BIKE_PICKUPL", "PED:BIKE_PICKUPR", "PED:BIKE_PULLUPL",
 "PED:BIKE_PULLUPR", "PED:BOMBER", "PED:CAR_ALIGNHI_LHS", "PED:CAR_ALIGNHI_RHS", "PED:CAR_ALIGN_LHS",
 "PED:CAR_ALIGN_RHS", "PED:CAR_CLOSEDOORL_LHS", "PED:CAR_CLOSEDOORL_RHS", "PED:CAR_CLOSEDOOR_LHS", "PED:CAR_CLOSEDOOR_RHS",
 "PED:CAR_CLOSE_LHS", "PED:CAR_CLOSE_RHS", "PED:CAR_CRAWLOUTRHS", "PED:CAR_DEAD_LHS", "PED:CAR_DEAD_RHS",
 "PED:CAR_DOORLOCKED_LHS", "PED:CAR_DOORLOCKED_RHS", "PED:CAR_FALLOUT_LHS", "PED:CAR_FALLOUT_RHS", "PED:CAR_GETINL_LHS",
 "PED:CAR_GETINL_RHS", "PED:CAR_GETIN_LHS", "PED:CAR_GETIN_RHS", "PED:CAR_GETOUTL_LHS", "PED:CAR_GETOUTL_RHS",
 "PED:CAR_GETOUT_LHS", "PED:CAR_GETOUT_RHS", "PED:CAR_HOOKERTALK", "PED:CAR_JACKEDLHS", "PED:CAR_JACKEDRHS",
 "PED:CAR_JUMPIN_LHS", "PED:CAR_LB", "PED:CAR_LB_PRO", "PED:CAR_LB_WEAK", "PED:CAR_LJACKEDLHS",
 "PED:CAR_LJACKEDRHS", "PED:CAR_LSHUFFLE_RHS", "PED:CAR_LSIT", "PED:CAR_OPEN_LHS", "PED:CAR_OPEN_RHS",
 "PED:CAR_PULLOUTL_LHS", "PED:CAR_PULLOUTL_RHS", "PED:CAR_PULLOUT_LHS", "PED:CAR_PULLOUT_RHS", "PED:CAR_QJACKED",
 "PED:CAR_ROLLDOOR", "PED:CAR_ROLLDOORLO", "PED:CAR_ROLLOUT_LHS", "PED:CAR_ROLLOUT_RHS", "PED:CAR_SHUFFLE_RHS",
 "PED:CAR_SIT", "PED:CAR_SITP", "PED:CAR_SITPLO", "PED:CAR_SIT_PRO", "PED:CAR_SIT_WEAK",
 "PED:CAR_TUNE_RADIO", "PED:CLIMB_IDLE", "PED:CLIMB_JUMP", "PED:CLIMB_JUMP2FALL", "PED:CLIMB_JUMP_B",
 "PED:CLIMB_PULL", "PED:CLIMB_STAND", "PED:CLIMB_STAND_FINISH", "PED:COWER", "PED:CROUCH_ROLL_L",
 "PED:CROUCH_ROLL_R", "PED:DAM_ARML_FRMBK", "PED:DAM_ARML_FRMFT", "PED:DAM_ARML_FRMLT", "PED:DAM_ARMR_FRMBK",
 "PED:DAM_ARMR_FRMFT", "PED:DAM_ARMR_FRMRT", "PED:DAM_LEGL_FRMBK", "PED:DAM_LEGL_FRMFT", "PED:DAM_LEGL_FRMLT",
 "PED:DAM_LEGR_FRMBK", "PED:DAM_LEGR_FRMFT", "PED:DAM_LEGR_FRMRT", "PED:DAM_STOMACH_FRMBK", "PED:DAM_STOMACH_FRMFT",
 "PED:DAM_STOMACH_FRMLT", "PED:DAM_STOMACH_FRMRT", "PED:DOOR_LHINGE_O", "PED:DOOR_RHINGE_O", "PED:DRIVEBYL_L",
 "PED:DRIVEBYL_R", "PED:DRIVEBY_L", "PED:DRIVEBY_R", "PED:DRIVE_BOAT", "PED:DRIVE_BOAT_BACK",
 "PED:DRIVE_BOAT_L", "PED:DRIVE_BOAT_R", "PED:DRIVE_L", "PED:DRIVE_LO_L", "PED:DRIVE_LO_R",
 "PED:DRIVE_L_PRO", "PED:DRIVE_L_PRO_SLOW", "PED:DRIVE_L_SLOW", "PED:DRIVE_L_WEAK", "PED:DRIVE_L_WEAK_SLOW",
 "PED:DRIVE_R", "PED:DRIVE_R_PRO", "PED:DRIVE_R_PRO_SLOW", "PED:DRIVE_R_SLOW", "PED:DRIVE_R_WEAK",
 "PED:DRIVE_R_WEAK_SLOW", "PED:DRIVE_TRUCK", "PED:DRIVE_TRUCK_BACK", "PED:DRIVE_TRUCK_L", "PED:DRIVE_TRUCK_R",
 "PED:DROWN", "PED:DUCK_COWER", "PED:ENDCHAT_01", "PED:ENDCHAT_02", "PED:ENDCHAT_03",
 "PED:EV_DIVE", "PED:EV_STEP", "PED:FACANGER", "PED:FACGUM", "PED:FACSURP",
 "PED:FACSURPM", "PED:FACTALK", "PED:FACURIOS", "PED:FALL_BACK", "PED:FALL_COLLAPSE",
 "PED:FALL_FALL", "PED:FALL_FRONT", "PED:FALL_GLIDE", "PED:FALL_LAND", "PED:FALL_SKYDIVE",
 "PED:FIGHT2IDLE", "PED:FIGHTA_1", "PED:FIGHTA_2", "PED:FIGHTA_3", "PED:FIGHTA_BLOCK",
 "PED:FIGHTA_G", "PED:FIGHTA_M", "PED:FIGHTIDLE", "PED:FIGHTSHB", "PED:FIGHTSHF",
 "PED:FIGHTSH_BWD", "PED:FIGHTSH_FWD", "PED:FIGHTSH_LEFT", "PED:FIGHTSH_RIGHT", "PED:FLEE_LKAROUND_01",
 "PED:FLOOR_HIT", "PED:FLOOR_HIT_F", "PED:FUCKU", "PED:GANG_GUNSTAND", "PED:GAS_CWR",
 "PED:GETUP", "PED:GETUP_FRONT", "PED:GUM_EAT", "PED:GUNCROUCHBWD", "PED:GUNCROUCHFWD",
 "PED:GUNMOVE_BWD", "PED:GUNMOVE_FWD", "PED:GUNMOVE_L", "PED:GUNMOVE_R", "PED:GUN_2_IDLE",
 "PED:GUN_BUTT", "PED:GUN_BUTT_CROUCH", "PED:GUN_STAND", "PED:HANDSCOWER", "PED:HANDSUP",
 "PED:HITA_1", "PED:HITA_2", "PED:HITA_3", "PED:HIT_BACK", "PED:HIT_BEHIND",
 "PED:HIT_FRONT", "PED:HIT_GUN_BUTT", "PED:HIT_L", "PED:HIT_R", "PED:HIT_WALK",
 "PED:HIT_WALL", "PED:IDLESTANCE_FAT", "PED:IDLESTANCE_OLD", "PED:IDLE_ARMED", "PED:IDLE_CHAT",
 "PED:IDLE_CSAW", "PED:IDLE_GANG1", "PED:IDLE_HBHB", "PED:IDLE_ROCKET", "PED:IDLE_STANCE",
 "PED:IDLE_TAXI", "PED:IDLE_TIRED", "PED:JETPACK_IDLE", "PED:JOG_FEMALEA", "PED:JOG_MALEA",
 "PED:JUMP_GLIDE", "PED:JUMP_LAND", "PED:JUMP_LAUNCH", "PED:JUMP_LAUNCH_R", "PED:KART_DRIVE",
 "PED:KART_L", "PED:KART_LB", "PED:KART_R", "PED:KD_LEFT", "PED:KD_RIGHT",
 "PED:KO_SHOT_FACE", "PED:KO_SHOT_FRONT", "PED:KO_SHOT_STOM", "PED:KO_SKID_BACK", "PED:KO_SKID_FRONT",
 "PED:KO_SPIN_L", "PED:KO_SPIN_R", "PED:PASS_SMOKE_IN_CAR", "PED:PHONE_IN", "PED:PHONE_OUT",
 "PED:PHONE_TALK", "PED:PLAYER_SNEAK", "PED:PLAYER_SNEAK_WALKSTART", "PED:ROADCROSS", "PED:ROADCROSS_FEMALE",
 "PED:ROADCROSS_GANG", "PED:ROADCROSS_OLD", "PED:RUN_1ARMED", "PED:RUN_ARMED", "PED:RUN_CIVI",
 "PED:RUN_CSAW", "PED:RUN_FAT", "PED:RUN_FATOLD", "PED:RUN_GANG1", "PED:RUN_LEFT",
 "PED:RUN_OLD", "PED:RUN_PLAYER", "PED:RUN_RIGHT", "PED:RUN_ROCKET", "PED:RUN_STOP",
 "PED:RUN_STOPR", "PED:RUN_WUZI", "PED:SEAT_DOWN", "PED:SEAT_IDLE", "PED:SEAT_UP",
 "PED:SHOT_LEFTP", "PED:SHOT_PARTIAL", "PED:SHOT_PARTIAL_B", "PED:SHOT_RIGHTP", "PED:SHOVE_PARTIAL",
 "PED:SMOKE_IN_CAR", "PED:SPRINT_CIVI", "PED:SPRINT_PANIC", "PED:SPRINT_WUZI", "PED:SWAT_RUN",
 "PED:SWIM_TREAD", "PED:TAP_HAND", "PED:TAP_HANDP", "PED:TURN_180", "PED:TURN_L",
 "PED:TURN_R", "PED:WALK_ARMED", "PED:WALK_CIVI", "PED:WALK_CSAW", "PED:WALK_DOORPARTIAL",
 "PED:WALK_DRUNK", "PED:WALK_FAT", "PED:WALK_FATOLD", "PED:WALK_GANG1", "PED:WALK_GANG2",
 "PED:WALK_OLD", "PED:WALK_PLAYER", "PED:WALK_ROCKET", "PED:WALK_SHUFFLE", "PED:WALK_START",
 "PED:WALK_START_ARMED", "PED:WALK_START_CSAW", "PED:WALK_START_ROCKET", "PED:WALK_WUZI", "PED:WEAPON_CROUCH",
 "PED:WOMAN_IDLESTANCE", "PED:WOMAN_RUN", "PED:WOMAN_RUNBUSY", "PED:WOMAN_RUNFATOLD", "PED:WOMAN_RUNPANIC",
 "PED:WOMAN_RUNSEXY", "PED:WOMAN_WALKBUSY", "PED:WOMAN_WALKFATOLD", "PED:WOMAN_WALKNORM", "PED:WOMAN_WALKOLD",
 "PED:WOMAN_WALKPRO", "PED:WOMAN_WALKSEXY", "PED:WOMAN_WALKSHOP", "PED:XPRESSSCRATCH", "PLAYER_DVBYS:PLYR_DRIVEBYBWD",
 "PLAYER_DVBYS:PLYR_DRIVEBYFWD", "PLAYER_DVBYS:PLYR_DRIVEBYLHS", "PLAYER_DVBYS:PLYR_DRIVEBYRHS", "PLAYIDLES:SHIFT", "PLAYIDLES:SHLDR",
 "PLAYIDLES:STRETCH", "PLAYIDLES:STRLEG", "PLAYIDLES:TIME", "POLICE:COPTRAF_AWAY", "POLICE:COPTRAF_COME",
 "POLICE:COPTRAF_LEFT", "POLICE:COPTRAF_STOP", "POLICE:COP_GETOUTCAR_LHS", "POLICE:COP_MOVE_FWD", "POLICE:CRM_DRGBST_01",
 "POLICE:DOOR_KICK", "POLICE:PLC_DRGBST_01", "POLICE:PLC_DRGBST_02", "POOL:POOL_CHALKCUE", "POOL:POOL_IDLE_STANCE",
 "POOL:POOL_LONG_SHOT", "POOL:POOL_LONG_SHOT_O", "POOL:POOL_LONG_START", "POOL:POOL_LONG_START_O", "POOL:POOL_MED_SHOT",
 "POOL:POOL_MED_SHOT_O", "POOL:POOL_MED_START", "POOL:POOL_MED_START_O", "POOL:POOL_PLACE_WHITE", "POOL:POOL_SHORT_SHOT",
 "POOL:POOL_SHORT_SHOT_O", "POOL:POOL_SHORT_START", "POOL:POOL_SHORT_START_O", "POOL:POOL_WALK", "POOL:POOL_WALK_START",
 "POOL:POOL_XLONG_SHOT", "POOL:POOL_XLONG_SHOT_O", "POOL:POOL_XLONG_START", "POOL:POOL_XLONG_START_O", "POOR:WINWASH_START",
 "POOR:WINWASH_WASH2BEG", "PYTHON:PYTHON_CROUCHFIRE", "PYTHON:PYTHON_CROUCHRELOAD", "PYTHON:PYTHON_FIRE", "PYTHON:PYTHON_FIRE_POOR",
 "PYTHON:PYTHON_RELOAD", "QUAD:QUAD_BACK", "QUAD:QUAD_DRIVEBY_FT", "QUAD:QUAD_DRIVEBY_LHS", "QUAD:QUAD_DRIVEBY_RHS",
 "QUAD:QUAD_FWD", "QUAD:QUAD_GETOFF_B", "QUAD:QUAD_GETOFF_LHS", "QUAD:QUAD_GETOFF_RHS", "QUAD:QUAD_GETON_LHS",
 "QUAD:QUAD_GETON_RHS", "QUAD:QUAD_HIT", "QUAD:QUAD_KICK", "QUAD:QUAD_LEFT", "QUAD:QUAD_PASSENGER",
 "QUAD:QUAD_REVERSE", "QUAD:QUAD_RIDE", "QUAD:QUAD_RIGHT", "QUAD_DBZ:PASS_DRIVEBY_BWD", "QUAD_DBZ:PASS_DRIVEBY_FWD",
 "QUAD_DBZ:PASS_DRIVEBY_LHS", "QUAD_DBZ:PASS_DRIVEBY_RHS", "RAPPING:LAUGH_01", "RAPPING:RAP_A_IN", "RAPPING:RAP_A_LOOP",
 "RAPPING:RAP_A_OUT", "RAPPING:RAP_B_IN", "RAPPING:RAP_B_LOOP", "RAPPING:RAP_B_OUT", "RAPPING:RAP_C_LOOP",
 "RIFLE:RIFLE_CROUCHFIRE", "RIFLE:RIFLE_CROUCHLOAD", "RIFLE:RIFLE_FIRE", "RIFLE:RIFLE_FIRE_POOR", "RIFLE:RIFLE_LOAD",
 "RIOT:RIOT_ANGRY", "RIOT:RIOT_ANGRY_B", "RIOT:RIOT_CHALLENGE", "RIOT:RIOT_CHANT", "RIOT:RIOT_FUKU",
 "RIOT:RIOT_PUNCHES", "RIOT:RIOT_SHOUT", "ROB_BANK:CAT_SAFE_END", "ROB_BANK:CAT_SAFE_OPEN", "ROB_BANK:CAT_SAFE_OPEN_O",
 "ROB_BANK:CAT_SAFE_ROB", "ROB_BANK:SHP_HANDSUP_SCR", "ROCKET:IDLE_ROCKET", "ROCKET:ROCKETFIRE", "ROCKET:RUN_ROCKET",
 "ROCKET:WALK_ROCKET", "ROCKET:WALK_START_ROCKET", "RUSTLER:PLANE_ALIGN_LHS", "RUSTLER:PLANE_CLOSE", "RUSTLER:PLANE_GETIN",
 "RUSTLER:PLANE_GETOUT", "RUSTLER:PLANE_OPEN", "RYDER:RYD_BECKON_01", "RYDER:RYD_BECKON_02", "RYDER:RYD_BECKON_03",
 "RYDER:RYD_DIE_PT1", "RYDER:RYD_DIE_PT2", "RYDER:VAN_CRATE_L", "RYDER:VAN_CRATE_R", "RYDER:VAN_FALL_L",
 "RYDER:VAN_FALL_R", "RYDER:VAN_LEAN_L", "RYDER:VAN_LEAN_R", "RYDER:VAN_PICKUP_E", "RYDER:VAN_PICKUP_S",
 "RYDER:VAN_STAND", "RYDER:VAN_STAND_CRATE", "RYDER:VAN_THROW", "SCRATCHING:SCDLDLP", "SCRATCHING:SCDLULP",
 "SCRATCHING:SCDRDLP", "SCRATCHING:SCDRULP", "SCRATCHING:SCLNG_L", "SCRATCHING:SCLNG_R", "SCRATCHING:SCMID_L",
 "SCRATCHING:SCMID_R", "SCRATCHING:SCSHRTL", "SCRATCHING:SCSHRTR", "SCRATCHING:SC_LTOR", "SCRATCHING:SC_RTOL",
 "SHAMAL:SHAMAL_ALIGN", "SHAMAL:SHAMAL_GETIN_LHS", "SHAMAL:SHAMAL_GETOUT_LHS", "SHAMAL:SHAMAL_OPEN", "SHOP:ROB_2IDLE",
 "SHOP:ROB_LOOP", "SHOP:ROB_LOOP_THREAT", "SHOP:ROB_SHIFTY", "SHOP:ROB_STICKUP_IN", "SHOP:SHP_DUCK",
 "SHOP:SHP_DUCK_AIM", "SHOP:SHP_DUCK_FIRE", "SHOP:SHP_GUN_AIM", "SHOP:SHP_GUN_DUCK", "SHOP:SHP_GUN_FIRE",
 "SHOP:SHP_GUN_GRAB", "SHOP:SHP_GUN_THREAT", "SHOP:SHP_HANDSUP_SCR", "SHOP:SHP_JUMP_GLIDE", "SHOP:SHP_JUMP_LAND",
 "SHOP:SHP_JUMP_LAUNCH", "SHOP:SHP_ROB_GIVECASH", "SHOP:SHP_ROB_HANDSUP", "SHOP:SHP_ROB_REACT", "SHOP:SHP_SERVE_END",
 "SHOP:SHP_SERVE_IDLE", "SHOP:SHP_SERVE_LOOP", "SHOP:SHP_SERVE_START", "SHOP:SMOKE_RYD", "SHOTGUN:SHOTGUN_CROUCHFIRE",
 "SHOTGUN:SHOTGUN_FIRE", "SHOTGUN:SHOTGUN_FIRE_POOR", "SILENCED:CROUCHRELOAD", "SILENCED:SILENCECROUCHFIRE", "SILENCED:SILENCE_FIRE",
 "SILENCED:SILENCE_RELOAD", "SKATE:SKATE_IDLE", "SKATE:SKATE_RUN", "SKATE:SKATE_SPRINT", "SMOKING:F_SMKLEAN_LOOP",
 "SMOKING:M_SMKLEAN_LOOP", "SMOKING:M_SMKSTND_LOOP", "SMOKING:M_SMK_DRAG", "SMOKING:M_SMK_IN", "SMOKING:M_SMK_LOOP",
 "SMOKING:M_SMK_OUT", "SMOKING:M_SMK_TAP", "SNIPER:WEAPON_SNIPER", "SPRAYCAN:SPRAYCAN_FIRE", "SPRAYCAN:SPRAYCAN_FULL",
 "STRIP:PLY_CASH", "STRIP:PUN_CASH", "STRIP:PUN_HOLLER", "STRIP:PUN_LOOP", "STRIP:STRIP_A",
 "STRIP:STRIP_B", "STRIP:STRIP_C", "STRIP:STRIP_D", "STRIP:STRIP_E", "STRIP:STRIP_F",
 "STRIP:STRIP_G", "STRIP:STR_A2B", "STRIP:STR_B2A", "STRIP:STR_B2C", "STRIP:STR_C1",
 "STRIP:STR_C2", "STRIP:STR_C2B", "STRIP:STR_LOOP_A", "STRIP:STR_LOOP_B", "STRIP:STR_LOOP_C",
 "SUNBATHE:BATHERDOWN", "SUNBATHE:BATHERUP", "SUNBATHE:LAY_BAC_IN", "SUNBATHE:LAY_BAC_OUT", "SUNBATHE:PARKSIT_M_IDLEA",
 "SUNBATHE:PARKSIT_M_IDLEB", "SUNBATHE:PARKSIT_M_IDLEC", "SUNBATHE:PARKSIT_M_IN", "SUNBATHE:PARKSIT_M_OUT", "SUNBATHE:PARKSIT_W_IDLEA",
 "SUNBATHE:PARKSIT_W_IDLEB", "SUNBATHE:PARKSIT_W_IDLEC", "SUNBATHE:PARKSIT_W_IN", "SUNBATHE:PARKSIT_W_OUT", "SUNBATHE:SBATHE_F_LIEB2SIT",
 "SUNBATHE:SBATHE_F_OUT", "SUNBATHE:SITNWAIT_IN_W", "SUNBATHE:SITNWAIT_OUT_W", "SWAT:GNSTWALL_INJURD", "SWAT:JMP_WALL1M_180",
 "SWAT:RAIL_FALL", "SWAT:RAIL_FALL_CRAWL", "SWAT:SWT_BREACH_01", "SWAT:SWT_BREACH_02", "SWAT:SWT_BREACH_03",
 "SWAT:SWT_GO", "SWAT:SWT_LKT", "SWAT:SWT_STY", "SWAT:SWT_VENT_01", "SWAT:SWT_VENT_02",
 "SWAT:SWT_VNT_SHT_DIE", "SWAT:SWT_VNT_SHT_IN", "SWAT:SWT_VNT_SHT_LOOP", "SWAT:SWT_WLLPK_L", "SWAT:SWT_WLLPK_L_BACK",
 "SWAT:SWT_WLLPK_R", "SWAT:SWT_WLLPK_R_BACK", "SWAT:SWT_WLLSHOOT_IN_L", "SWAT:SWT_WLLSHOOT_IN_R", "SWAT:SWT_WLLSHOOT_OUT_L",
 "SWAT:SWT_WLLSHOOT_OUT_R", "SWEET:HO_ASS_SLAPPED", "SWEET:LAFIN_PLAYER", "SWEET:LAFIN_SWEET", "SWEET:PLYR_HNDSHLDR_01",
 "SWEET:SWEET_ASS_SLAP", "SWEET:SWEET_HNDSHLDR_01", "SWEET:SWEET_INJUREDLOOP", "SWIM:SWIM_BREAST", "SWIM:SWIM_CRAWL",
 "SWIM:SWIM_DIVE_UNDER", "SWIM:SWIM_GLIDE", "SWIM:SWIM_JUMPOUT", "SWIM:SWIM_TREAD", "SWIM:SWIM_UNDER",
 "SWORD:SWORD_1", "SWORD:SWORD_2", "SWORD:SWORD_3", "SWORD:SWORD_4", "SWORD:SWORD_BLOCK",
 "SWORD:SWORD_HIT_1", "SWORD:SWORD_HIT_2", "SWORD:SWORD_HIT_3", "SWORD:SWORD_IDLE", "SWORD:SWORD_PART",
 "TANK:TANK_ALIGN_LHS", "TANK:TANK_CLOSE_LHS", "TANK:TANK_DOORLOCKED", "TANK:TANK_GETIN_LHS", "TANK:TANK_GETOUT_LHS",
 "TANK:TANK_OPEN_LHS", "TATTOOS:TAT_ARML_IN_O", "TATTOOS:TAT_ARML_IN_P", "TATTOOS:TAT_ARML_IN_T", "TATTOOS:TAT_ARML_OUT_O",
 "TATTOOS:TAT_ARML_OUT_P", "TATTOOS:TAT_ARML_OUT_T", "TATTOOS:TAT_ARML_POSE_O", "TATTOOS:TAT_ARML_POSE_P", "TATTOOS:TAT_ARML_POSE_T",
 "TATTOOS:TAT_ARMR_IN_O", "TATTOOS:TAT_ARMR_IN_P", "TATTOOS:TAT_ARMR_IN_T", "TATTOOS:TAT_ARMR_OUT_O", "TATTOOS:TAT_ARMR_OUT_P",
 "TATTOOS:TAT_ARMR_OUT_T", "TATTOOS:TAT_ARMR_POSE_O", "TATTOOS:TAT_ARMR_POSE_P", "TATTOOS:TAT_ARMR_POSE_T", "TATTOOS:TAT_BACK_IN_O",
 "TATTOOS:TAT_BACK_IN_P", "TATTOOS:TAT_BACK_IN_T", "TATTOOS:TAT_BACK_OUT_O", "TATTOOS:TAT_BACK_OUT_P", "TATTOOS:TAT_BACK_OUT_T",
 "TATTOOS:TAT_BACK_POSE_O", "TATTOOS:TAT_BACK_POSE_P", "TATTOOS:TAT_BACK_POSE_T", "TATTOOS:TAT_BACK_SIT_IN_P", "TATTOOS:TAT_BACK_SIT_LOOP_P",
 "TATTOOS:TAT_BACK_SIT_OUT_P", "TATTOOS:TAT_BEL_IN_O", "TATTOOS:TAT_BEL_IN_T", "TATTOOS:TAT_BEL_OUT_O", "TATTOOS:TAT_BEL_OUT_T",
 "TATTOOS:TAT_BEL_POSE_O", "TATTOOS:TAT_BEL_POSE_T", "TATTOOS:TAT_CHE_IN_O", "TATTOOS:TAT_CHE_IN_P", "TATTOOS:TAT_CHE_IN_T",
 "TATTOOS:TAT_CHE_OUT_O", "TATTOOS:TAT_CHE_OUT_P", "TATTOOS:TAT_CHE_OUT_T", "TATTOOS:TAT_CHE_POSE_O", "TATTOOS:TAT_CHE_POSE_P",
 "TATTOOS:TAT_CHE_POSE_T", "TATTOOS:TAT_DROP_O", "TATTOOS:TAT_IDLE_LOOP_O", "TATTOOS:TAT_IDLE_LOOP_T", "TATTOOS:TAT_SIT_IN_O",
 "TATTOOS:TAT_SIT_IN_P", "TATTOOS:TAT_SIT_IN_T", "TATTOOS:TAT_SIT_LOOP_O", "TATTOOS:TAT_SIT_LOOP_P", "TATTOOS:TAT_SIT_LOOP_T",
 "TATTOOS:TAT_SIT_OUT_O", "TATTOOS:TAT_SIT_OUT_P", "TATTOOS:TAT_SIT_OUT_T", "TEC:TEC_CROUCHFIRE", "TEC:TEC_CROUCHRELOAD",
 "TEC:TEC_FIRE", "TEC:TEC_RELOAD", "TRAIN:TRAN_GTUP", "TRAIN:TRAN_HNG", "TRAIN:TRAN_OUCH",
 "TRAIN:TRAN_STMB", "TRUCK:TRUCK_ALIGN_LHS", "TRUCK:TRUCK_ALIGN_RHS", "TRUCK:TRUCK_CLOSEDOOR_LHS", "TRUCK:TRUCK_CLOSEDOOR_RHS",
 "TRUCK:TRUCK_CLOSE_LHS", "TRUCK:TRUCK_CLOSE_RHS", "TRUCK:TRUCK_GETIN_LHS", "TRUCK:TRUCK_GETIN_RHS", "TRUCK:TRUCK_GETOUT_LHS",
 "TRUCK:TRUCK_GETOUT_RHS", "TRUCK:TRUCK_JACKEDLHS", "TRUCK:TRUCK_JACKEDRHS", "TRUCK:TRUCK_OPEN_LHS", "TRUCK:TRUCK_OPEN_RHS",
 "TRUCK:TRUCK_PULLOUT_LHS", "TRUCK:TRUCK_PULLOUT_RHS", "TRUCK:TRUCK_SHUFFLE", "UZI:UZI_CROUCHFIRE", "UZI:UZI_CROUCHRELOAD",
 "UZI:UZI_FIRE", "UZI:UZI_FIRE_POOR", "UZI:UZI_RELOAD", "VAN:VAN_CLOSE_BACK_LHS", "VAN:VAN_CLOSE_BACK_RHS",
 "VAN:VAN_GETIN_BACK_LHS", "VAN:VAN_GETIN_BACK_RHS", "VAN:VAN_GETOUT_BACK_LHS", "VAN:VAN_GETOUT_BACK_RHS", "VAN:VAN_OPEN_BACK_LHS",
 "VAN:VAN_OPEN_BACK_RHS", "VENDING:VEND_DRINK2_P", "VENDING:VEND_DRINK_P", "VENDING:VEND_EAT1_P", "VENDING:VEND_EAT_P",
 "VENDING:VEND_USE", "VENDING:VEND_USE_PT2", "VORTEX:CAR_JUMPIN_LHS", "VORTEX:CAR_JUMPIN_RHS", "VORTEX:VORTEX_GETOUT_LHS",
 "VORTEX:VORTEX_GETOUT_RHS", "WAYFARER:WF_BACK", "WAYFARER:WF_DRIVEBYFT", "WAYFARER:WF_DRIVEBYLHS", "WAYFARER:WF_DRIVEBYRHS",
 "WAYFARER:WF_FWD", "WAYFARER:WF_GETOFFBACK", "WAYFARER:WF_GETOFFLHS", "WAYFARER:WF_GETOFFRHS", "WAYFARER:WF_HIT",
 "WAYFARER:WF_JUMPONL", "WAYFARER:WF_JUMPONR", "WAYFARER:WF_KICK", "WAYFARER:WF_LEFT", "WAYFARER:WF_PASSENGER",
 "WAYFARER:WF_PUSHES", "WAYFARER:WF_RIDE", "WAYFARER:WF_RIGHT", "WAYFARER:WF_STILL", "WEAPONS:SHP_1H_LIFT",
 "WEAPONS:SHP_1H_LIFT_END", "WEAPONS:SHP_1H_RET", "WEAPONS:SHP_1H_RET_S", "WEAPONS:SHP_2H_LIFT", "WEAPONS:SHP_2H_LIFT_END",
 "WEAPONS:SHP_2H_RET", "WEAPONS:SHP_2H_RET_S", "WEAPONS:SHP_AR_LIFT", "WEAPONS:SHP_AR_LIFT_END", "WEAPONS:SHP_AR_RET",
 "WEAPONS:SHP_AR_RET_S", "WEAPONS:SHP_G_LIFT_IN", "WEAPONS:SHP_G_LIFT_OUT", "WEAPONS:SHP_TRAY_IN", "WEAPONS:SHP_TRAY_OUT",
 "WEAPONS:SHP_TRAY_POSE", "WUZI:CS_DEAD_GUY", "WUZI:CS_PLYR_PT1", "WUZI:CS_PLYR_PT2", "WUZI:CS_WUZI_PT1",
 "WUZI:CS_WUZI_PT2", "WUZI:WALKSTART_IDLE_01", "WUZI:WUZI_FOLLOW", "WUZI:WUZI_GREET_PLYR", "WUZI:WUZI_GREET_WUZI",
 "WUZI:WUZI_GRND_CHK", "WUZI:WUZI_STAND_LOOP", "WUZI:WUZI_WALK", "WOP:DANCE_G1", "WOP:DANCE_G2",
 "WOP:DANCE_G3", "WOP:DANCE_G4", "WOP:DANCE_G5", "WOP:DANCE_G6", "WOP:DANCE_G7",
 "WOP:DANCE_G8", "WOP:DANCE_G9", "WOP:DANCE_G10", "WOP:DANCE_G11", "WOP:DANCE_G12",
 "WOP:DANCE_G13", "WOP:DANCE_G14", "WOP:DANCE_G15", "WOP:DANCE_G16", "WOP:DANCE_B1",
 "WOP:DANCE_B2", "WOP:DANCE_B3", "WOP:DANCE_B4", "WOP:DANCE_B5", "WOP:DANCE_B6",
 "WOP:DANCE_B7", "WOP:DANCE_B8", "WOP:DANCE_B9", "WOP:DANCE_B10", "WOP:DANCE_B11",
 "WOP:DANCE_B12", "WOP:DANCE_B13", "WOP:DANCE_B14", "WOP:DANCE_B15", "WOP:DANCE_B16",
 "WOP:DANCE_LOOP", "GFUNK:DANCE_G1", "GFUNK:DANCE_G2", "GFUNK:DANCE_G3", "GFUNK:DANCE_G4",
 "GFUNK:DANCE_G5", "GFUNK:DANCE_G6", "GFUNK:DANCE_G7", "GFUNK:DANCE_G8", "GFUNK:DANCE_G9",
 "GFUNK:DANCE_G10", "GFUNK:DANCE_G11", "GFUNK:DANCE_G12", "GFUNK:DANCE_G13", "GFUNK:DANCE_G14",
 "GFUNK:DANCE_G15", "GFUNK:DANCE_G16", "GFUNK:DANCE_B1", "GFUNK:DANCE_B2", "GFUNK:DANCE_B3",
 "GFUNK:DANCE_B4", "GFUNK:DANCE_B5", "GFUNK:DANCE_B6", "GFUNK:DANCE_B7", "GFUNK:DANCE_B8",
 "GFUNK:DANCE_B9", "GFUNK:DANCE_B10", "GFUNK:DANCE_B11", "GFUNK:DANCE_B12", "GFUNK:DANCE_B13",
 "GFUNK:DANCE_B14", "GFUNK:DANCE_B15", "GFUNK:DANCE_B16", "GFUNK:DANCE_LOOP", "RUNNINGMAN:DANCE_G1",
 "RUNNINGMAN:DANCE_G2", "RUNNINGMAN:DANCE_G3", "RUNNINGMAN:DANCE_G4", "RUNNINGMAN:DANCE_G5", "RUNNINGMAN:DANCE_G6",
 "RUNNINGMAN:DANCE_G7", "RUNNINGMAN:DANCE_G8", "RUNNINGMAN:DANCE_G9", "RUNNINGMAN:DANCE_G10", "RUNNINGMAN:DANCE_G11",
 "RUNNINGMAN:DANCE_G12", "RUNNINGMAN:DANCE_G13", "RUNNINGMAN:DANCE_G14", "RUNNINGMAN:DANCE_G15", "RUNNINGMAN:DANCE_G16",
 "RUNNINGMAN:DANCE_B1", "RUNNINGMAN:DANCE_B2", "RUNNINGMAN:DANCE_B3", "RUNNINGMAN:DANCE_B4", "RUNNINGMAN:DANCE_B5",
 "RUNNINGMAN:DANCE_B6", "RUNNINGMAN:DANCE_B7", "RUNNINGMAN:DANCE_B8", "RUNNINGMAN:DANCE_B9", "RUNNINGMAN:DANCE_B10",
 "RUNNINGMAN:DANCE_B11", "RUNNINGMAN:DANCE_B12", "RUNNINGMAN:DANCE_B13", "RUNNINGMAN:DANCE_B14", "RUNNINGMAN:DANCE_B15",
 "RUNNINGMAN:DANCE_B16", "RUNNINGMAN:DANCE_LOOP"

};

char* GetAnimationNameByIndex( uint32_t index )
{
	if( index > 1811 || index < 1 ) return (char*)0;
	return ( char* )t_AnimationsName[ index ];
}

void Unprotect(uint32_t address, uint32_t len)
{
	uint32_t l_uint32_OldProtect = 0;
#ifdef WIN32
	VirtualProtect ( ( LPVOID )address, len, PAGE_READWRITE, &l_uint32_OldProtect );
#else
	uint32_t pagesize = getpagesize();
    uint32_t addr = (((uint32_t)(address) / pagesize) * pagesize);
    uint32_t length = (len / pagesize) * pagesize + pagesize * 2;
    mprotect((void*)addr, length, PROT_READ | PROT_WRITE | PROT_EXEC);
#endif
}

void HookFunction ( uint32_t a_uint32_Address, uint32_t a_uint32_Function )
{
	Unprotect(a_uint32_Address, 5);

	*( uint8_t* )( a_uint32_Address ) = 0xE9;
	*( uint32_t* )( a_uint32_Address + 0x01 ) = a_uint32_Function - ( a_uint32_Address + 5 );
}

void HookFunctionCall ( uint32_t a_uint32_Address, uint32_t a_uint32_Function )
{
	Unprotect(a_uint32_Address, 5);

	*( uint8_t* )( a_uint32_Address ) = 0xE8;
	*( uint32_t* )( a_uint32_Address + 0x01 ) = a_uint32_Function - ( a_uint32_Address + 5 );
}

#ifdef _STANDALONE

FILE* pLogFile;
extern uint32_t serverTicket;
BOOL quitProcess;
/*
int CNetGame__RPC_SendToEveryPlayer( uint32_t a_NetGame, char** a_Rpc, RakNet::BitStream* a_BitStream, uint16_t a_Broadcast, uint32_t a_Unknown )
{
	CNetGame* ptr = (CNetGame*)a_NetGame;
	ptr->GlobalRPC(*a_Rpc, a_BitStream, a_Broadcast, a_Unknown);

	return 1;
}
int CNetGame__RPC_SendToPlayer( uint32_t a_NetGame, char** a_Rpc, RakNet::BitStream* a_BitStream, uint16_t a_Broadcast, uint32_t a_Unknown )
{
	CNetGame* ptr = (CNetGame*)a_NetGame;
	ptr->PlayerRPC(*a_Rpc, a_BitStream, a_Broadcast, a_Unknown);

	return 1;
}
int CNetGame__RPC_SendToStreamedPlayer( uint32_t a_NetGame, char** a_Rpc, RakNet::BitStream* a_BitStream, uint16_t a_Broadcast, uint32_t a_Unknown )
{
	CNetGame* ptr = (CNetGame*)a_NetGame;
	ptr->AddedPlayersRPC(*a_Rpc, a_BitStream, a_Broadcast, a_Unknown);

	return 1;
}
int CNetGame__RPC_SendToPlayerVehicle( uint32_t a_NetGame, char** a_Rpc, RakNet::BitStream* a_BitStream, uint16_t a_Broadcast, uint16_t a_Exclude, uint32_t a_Unknown )
{
	CNetGame* ptr = (CNetGame*)a_NetGame;
	ptr->AddedVehicleRPC(*a_Rpc, a_BitStream, a_Broadcast, a_Exclude, a_Unknown);

	return 1;
}

*/

void logprintf(char* format, ...)
{	
	char buffer[1024];
    
	va_list ap;
	va_start(ap, format);
	vsprintf(buffer, format, ap);
	va_end(ap);

#ifdef WIN32
	char tmp_buffer[1024];
	CharToOemA(buffer, tmp_buffer);
	puts(tmp_buffer);
#else
	if(__Console && __Console->GetBoolVar("output"))
		puts(buffer);
#endif

	if (pLogFile) 
	{
		if (__Console) 
		{
			if (__Console->GetBoolVar("timestamp"))
			{
				const struct tm *tm;
				time_t now;
				now = time(NULL);
				tm = localtime(&now);
				char *s;
				s = new char[256];
				strftime(s, 256, __Console->GetStringVar("logtimeformat"), tm);
				fprintf(pLogFile, "%s %s\n", s, buffer);
				delete [] s;
			}
			else fprintf(pLogFile, "%s\n", buffer);
		}
		else fprintf(pLogFile, "%s\n", buffer);
		fflush(pLogFile);
	}

	if (RconUser != INVALID_PLAYER_ID) 
	{
		__NetGame->SendClientMessage(RconUser, 0xFFFFFFFF, buffer);
	} 
	/*
	else if (bRconReply) 
	{
		RconSocketReply(buffer);
	}
	*/
}

void flogprintf(char* format, ...)
{
	if (!pLogFile) return;
	va_list ap;
	va_start(ap, format);
	char buffer[512];
	vsprintf(buffer, format, ap);
	fprintf(pLogFile, "%s\n", buffer);
	fflush(pLogFile);
	va_end(ap);
}

void ChangeServerMaxPlayers()
{
	int maxplayers = __Console->GetIntVar("maxplayers");
	if (maxplayers < 0)
		__Console->SetIntVar("maxplayers", 0);
	if (maxplayers > MAX_PLAYERS)
		__Console->SetIntVar("maxplayers", MAX_PLAYERS);

	if (__NetGame)
	{
		if (__Console->GetIntVar("maxplayers") > MAX_PLAYERS) 
			__Console->SetIntVar("maxplayers", MAX_PLAYERS);

		__NetGame->rakServerInterface->SetAllowedPlayers((uint16_t)__Console->GetIntVar("maxplayers"));
	}
}

void ChangeServerStreamRate()
{
	int currentRate = __Console->GetIntVar("stream_rate");

	if(currentRate < 500) __Console->SetIntVar("stream_rate", 500);
	if(currentRate > 5000) __Console->SetIntVar("stream_rate", 5000);
}

void ChangeServerStreamDistance()
{
	float currentDistance = __Console->GetFloatVar("stream_distance");
	
	if(currentDistance < 50.0f)	__Console->SetFloatVar("stream_distance", 50.0f);
	if(currentDistance > 400.0f) __Console->SetFloatVar("stream_distance", 400.0f);
}

void ChangeServerPassword()
{
	if (__NetGame)
	{
		char* szPass = __Console->GetStringVar("password");
		if ((szPass) && (szPass[0] != 0) && (szPass[0] != '0'))
		{
			logprintf("Setting server password to: \"%s\"", szPass);
			__NetGame->rakServerInterface->SetPassword(szPass);
		} 
		else 
		{
			__Console->SetStringVar( "password", 0 );
			logprintf("Server password has been removed.");
			__NetGame->rakServerInterface->SetPassword(NULL);
		}
	}
}

void ChangeScriptDebugging()
{
	bScriptDebug = __Console->GetBoolVar("scriptdebug");
}

void LoadServerLog()
{
	bool reload = 0;
	if (pLogFile)
	{
		fclose(pLogFile);
		reload = true;
	}
	pLogFile = fopen("server_log.txt", "a");
	if (pLogFile)
	{
		logprintf("");
		logprintf("----------");
		if (reload) logprintf("Reloaded log file: \"server_log.txt\".");
		else logprintf("Loaded log file: \"server_log.txt\".");
		logprintf("----------");
	} 
	else
		logprintf("Failed to load log file: \"server_log.txt\".");
}

#ifdef WIN32

#pragma comment(lib, "winmm.lib")
float GetElapsedTime()
{
	static BOOL bTimerInit = false;
	static BOOL bUsingOPF  = false;
	static LONGLONG nTicksPerSec = 0;

	if (!bTimerInit)
	{
		bTimerInit = true;
		LARGE_INTEGER qwTicksPerSec;
		bUsingOPF = QueryPerformanceFrequency(&qwTicksPerSec);
		if (bUsingOPF) nTicksPerSec = qwTicksPerSec.QuadPart;
	}

	if (bUsingOPF)
	{
		LARGE_INTEGER qwTime;
		QueryPerformanceCounter(&qwTime);
		static LONGLONG llLastTime = qwTime.QuadPart;
		double fElapsedTime = (double)(qwTime.QuadPart - llLastTime) / (double) nTicksPerSec;
		llLastTime = qwTime.QuadPart;
		return (float)fElapsedTime;
	} else {
		double fTime = timeGetTime() * 0.001;
		static double fLastTime = fTime;
		double fElapsedTime = (double)(fTime - fLastTime);
		fLastTime = fTime;
		return (float)fElapsedTime;
	}
}

#else

float GetElapsedTime()
{
	static timeval lasttv;
	timeval tv;
	float fRet;

    gettimeofday(&tv, NULL);

	if (!timerisset(&lasttv)) memcpy(&lasttv, &tv, sizeof(timeval));

	fRet = (float)((tv.tv_sec - lasttv.tv_sec) * 1000000) + (tv.tv_usec - lasttv.tv_usec);
	fRet /= 1000000.0f;
	
	memcpy(&lasttv,&tv,sizeof(timeval));

    return fRet;
}

#endif

#ifdef WIN32
extern LONG WINAPI exc_handler(_EXCEPTION_POINTERS* exc_inf);
#endif

//--------------------------------------------

#ifdef WIN32
HANDLE hConsoleExecuteEvent;
DWORD WINAPI ConsoleInputThread(void* pParam)
{
	char buf[512];
	while (true)
	{
		DWORD dwRead = 0;
		buf[0] = NULL;
		
		/* Don't use ReadConsoleW, we have to use the AINSI version. */
		ReadConsoleA(GetStdHandle(STD_INPUT_HANDLE), buf, sizeof(buf), &dwRead, NULL);

		if (dwRead > 2)
		{
			buf[dwRead] = 0x00;
			if(buf[0] != NULL && strlen(buf) >= 2 && (buf[0] != ' ' && buf[1] != ' '))
			{
				WaitForSingleObject(hConsoleExecuteEvent, INFINITE);
				flogprintf("Console input: %s", buf);
				__Console->Execute(buf);
				SetEvent(hConsoleExecuteEvent);
			}
		}
	}
}

BOOL WINAPI CtrlHandler(DWORD type)
{
    switch (type)
    {
        case CTRL_C_EVENT:
        case CTRL_BREAK_EVENT:
        case CTRL_CLOSE_EVENT:
        case CTRL_LOGOFF_EVENT:
        case CTRL_SHUTDOWN_EVENT:
			quitProcess = true;
            return TRUE;
    }
    return FALSE;
}

#else

pthread_mutex_t hConsoleExecuteMutex = PTHREAD_MUTEX_INITIALIZER;
pthread_cond_t hConsoleExecuteEvent  = PTHREAD_COND_INITIALIZER;

void* ConsoleInputThread(void* pParam)
{
	pthread_mutex_lock(&hConsoleExecuteMutex);
	char buf[512];
	while (true)
	{
		DWORD dwRead;
		buf[0] = NULL;
		gets(buf);
		if(buf[0] != NULL && strlen(buf) >= 2 && (buf[0] != ' ' && buf[1] != ' '))
		{
			buf[strlen(buf) + 1] = 0;
			pthread_cond_wait(&hConsoleExecuteEvent, &hConsoleExecuteMutex);
			flogprintf("Console input: %s", buf);
			__Console->Execute(buf);
			pthread_cond_broadcast(&hConsoleExecuteEvent);
		}
	}

	pthread_mutex_unlock(&hConsoleExecuteMutex);
	pthread_exit(NULL);
}

typedef struct _sig_ucontext
{
	unsigned long     uc_flags;
	struct ucontext   *uc_link;
	stack_t           uc_stack;
	struct sigcontext uc_mcontext;
	sigset_t          uc_sigmask;
} sig_ucontext_t;


void SignalHandler(int sig, siginfo_t* siginfo, void* uc)
{
	switch (sig)
	{
		case SIGSEGV:
		{
			void*	_bcktrace[64];
			char**	msg;
			void*	callee;

			const struct tm *tm;
			time_t now;
			now = time(NULL);
			tm = localtime(&now);
			char date[128];
			strftime(date, 128, "%c (%Z)", tm);

			sig_ucontext_t* ucontext = (sig_ucontext_t*)uc;
			callee = (void*)ucontext->uc_mcontext.eip;

			FILE* fp = fopen("crashinfo.txt", "a");
			fprintf(fp, "\r\n--------------------------\r\n");
			fprintf(fp, "SA-MP Server: %s\r\n\r\n", SAMP_VERSION);
			fprintf(fp, "Date: %s\r\n\r\n", date);
			fprintf(fp, "Signal %d (%s)\n", sig, strsignal(sig));

			int size = backtrace(_bcktrace, 64);
			_bcktrace[1] = callee;

			msg = backtrace_symbols(_bcktrace, size);
	
			for (int i = 1; i < size && msg != NULL; ++i)
				fprintf(fp, "[backtrace]: (%d) %s\n", i, msg[i]);

			fclose(fp);
			free(msg);
			exit(EXIT_FAILURE);
			break;
		}
		case SIGUSR1:
		{
			LoadServerLog();
			break;
		}
		case SIGUSR2:
		{
			if (__NetGame)
			{
				__NetGame->LoadBanList();
			}
		break;
		}
		case SIGINT:
		case SIGTERM:
		{
			quitProcess = TRUE;
			break;
		}
	}
}

char* strlwr(char* str)
{
	int len = strlen(str);

	for (size_t i=0; i<len; i++)
	{
		if ((str[i] >= 'A') && (str[i] <= 'Z'))
		{
			str[i] -= 32;
		}
	}
	return str;
}

char* itoa( int value, char* result, int base ) // from RakNet | Open SA:MP
{
	// check that the base if valid
	if (base < 2 || base > 16) { *result = 0; return result; }
	char* out = result;
	int quotient = value;

	int absQModB;

	do {
		// KevinJ - get rid of this dependency
		//*out = "0123456789abcdef"[ std::abs( quotient % base ) ];
		absQModB=quotient % base;
		if (absQModB < 0)
			absQModB=-absQModB;
		*out = "0123456789abcdef"[ absQModB ];
		++out;
		quotient /= base;
	} while ( quotient );

	// Only apply negative sign for base 10
	if ( value < 0 && base == 10) *out++ = '-';

	// KevinJ - get rid of this dependency
	// std::reverse( result, out );
	*out = 0;

	// KevinJ - My own reverse code
    char *start = result;
	char temp;
	out--;
	while (start < out)
	{
		temp=*start;
		*start=*out;
		*out=temp;
		start++;
		out--;
	}

	return result;
}

#endif


int iNetModeNormalOnfootSendRate	= NETMODE_NORMAL_ONFOOT_SENDRATE;
int iNetModeNormalIncarSendRate		= NETMODE_NORMAL_INCAR_SENDRATE;
int iNetModeFiringSendRate			= NETMODE_FIRING_SENDRATE;
int iNetModeSendMultiplier			= NETMODE_SEND_MULTIPLIER;

float fStreamDistance				= STREAMING_DISTANCE;
int	iStreamUpdateRate				= STREAMING_UPDATE_TICKS;
int	iServerSleepTimer				= SERVER_SLEEP_TIMER;

int iMaxNPC							= 0;

int Start()
{

#ifdef LINUX
	struct sigaction sv;
	sigemptyset(&sv.sa_mask);
	sv.sa_flags = SA_SIGINFO;
	sv.sa_sigaction = SignalHandler;
	sigaction(SIGTERM, &sv, NULL);
	sigaction(SIGQUIT, &sv, NULL);
	sigaction(SIGINT, &sv, NULL);
	sigaction(SIGUSR1, &sv, NULL);
	sigaction(SIGUSR2, &sv, NULL);
	sigaction(SIGSEGV, &sv, NULL);
	bool bOutputEnable = false;
	bool bInputEnable = false;
#endif

	bool bEnableAnnounce = true;
	int iMaxPlayers	= 50;
	int iListenPort	= 8192;

	bool bLanModeEnable = false;
	bool bEnableTimestamp = true;
	bool bGameMod = false;
	bool bEnableAC = false;
	bool bAllowQuery = true;
	bool bAllowRcon = true;
	bool bAllowQueryLog = false;
	bool enableScriptDebug = false;
	bool allowSampUser = true;

	LoadServerLog();

	logprintf("");
	logprintf("SA-MP Dedicated Server");
	logprintf("----------------------");
	logprintf("v" SAMP_VERSION ", (C)2005-2012 SA-MP Team\n");

	srand((unsigned int )time(NULL));
	serverTicket = (uint32_t)rand();

	__Console = new CConsole();

	__Console->AddVar("announce", CONSOLE_VARTYPE_BOOL, CONSOLE_VARFLAG_UNREMOVABLE, &bEnableAnnounce);
	__Console->AddVar("maxplayers", CONSOLE_VARTYPE_INT, CONSOLE_VARFLAG_UNREMOVABLE, &iMaxPlayers, ChangeServerMaxPlayers);
	__Console->AddVar("port", CONSOLE_VARTYPE_INT, CONSOLE_VARFLAG_UNREMOVABLE, &iListenPort);
	__Console->AddVar("lanmode", CONSOLE_VARTYPE_BOOL,CONSOLE_VARFLAG_UNREMOVABLE, &bLanModeEnable);
	__Console->AddVar("query", CONSOLE_VARTYPE_BOOL, CONSOLE_VARFLAG_UNREMOVABLE, &bAllowQuery);
	__Console->AddVar("rcon", CONSOLE_VARTYPE_BOOL, CONSOLE_VARFLAG_UNREMOVABLE, &bAllowRcon);
	__Console->AddVar("logqueries", CONSOLE_VARTYPE_BOOL, CONSOLE_VARFLAG_UNREMOVABLE, &bAllowQueryLog); 

	__Console->AddVar("stream_rate", CONSOLE_VARTYPE_INT, CONSOLE_VARFLAG_UNREMOVABLE, &iStreamUpdateRate, ChangeServerStreamRate);
	__Console->AddVar("stream_distance", CONSOLE_VARTYPE_FLOAT, CONSOLE_VARFLAG_UNREMOVABLE, &fStreamDistance, ChangeServerStreamDistance);

	__Console->AddVar("sleep", CONSOLE_VARTYPE_INT, CONSOLE_VARFLAG_UNREMOVABLE, &iServerSleepTimer);
    __Console->AddVar("maxnpc", CONSOLE_VARTYPE_INT, CONSOLE_VARFLAG_UNREMOVABLE, &iMaxNPC);

	__Console->AddVar("onfoot_rate", CONSOLE_VARTYPE_INT, CONSOLE_VARFLAG_UNREMOVABLE, &iNetModeNormalOnfootSendRate);
	__Console->AddVar("incar_rate", CONSOLE_VARTYPE_INT, CONSOLE_VARFLAG_UNREMOVABLE, &iNetModeNormalIncarSendRate);
	__Console->AddVar("weapon_rate", CONSOLE_VARTYPE_INT, CONSOLE_VARFLAG_UNREMOVABLE, &iNetModeFiringSendRate);

	__Console->AddVar("scriptdebug", CONSOLE_VARTYPE_BOOL, CONSOLE_VARFLAG_UNREMOVABLE, &enableScriptDebug, ChangeScriptDebugging);
	__Console->AddVar( "allow_samp", CONSOLE_VARTYPE_BOOL, CONSOLE_VARFLAG_UNREMOVABLE, &allowSampUser );

#ifdef LINUX
	__Console->AddVar("output", CONSOLE_VARTYPE_BOOL, 0, &bOutputEnable);
	__Console->AddVar("input", CONSOLE_VARTYPE_BOOL, 0, &bInputEnable);
#endif

	__Console->AddVar("timestamp", CONSOLE_VARTYPE_BOOL, CONSOLE_VARFLAG_UNREMOVABLE,&bEnableTimestamp);
	__Console->AddStringVar("bind", CONSOLE_VARFLAG_UNREMOVABLE, NULL);
	__Console->AddStringVar("password", CONSOLE_VARFLAG_UNREMOVABLE, NULL, ChangeServerPassword);
	__Console->AddStringVar("hostname", CONSOLE_VARFLAG_UNREMOVABLE, "SA:MP Server");
	__Console->AddStringVar("mapname", CONSOLE_VARFLAG_RULE | CONSOLE_VARFLAG_UNREMOVABLE, "San Andreas");
	__Console->AddStringVar("weburl", CONSOLE_VARFLAG_RULE | CONSOLE_VARFLAG_UNREMOVABLE, "www.sa-mp.com");
	__Console->AddStringVar("rcon_password", CONSOLE_VARFLAG_UNREMOVABLE, "changeme");
	__Console->AddStringVar("gravity", CONSOLE_VARFLAG_RULE | CONSOLE_VARFLAG_UNREMOVABLE, "0.008");
	__Console->AddStringVar("weather", CONSOLE_VARFLAG_RULE | CONSOLE_VARFLAG_UNREMOVABLE, "10");
	__Console->AddStringVar("gamemodetext", CONSOLE_VARFLAG_UNREMOVABLE, "Unknown");
	__Console->AddStringVar("filterscripts", CONSOLE_VARFLAG_UNREMOVABLE, "");
	__Console->AddStringVar("plugins", CONSOLE_VARFLAG_UNREMOVABLE, "");
	__Console->AddStringVar("nosign", CONSOLE_VARFLAG_UNREMOVABLE, "");
	__Console->AddStringVar("logtimeformat", CONSOLE_VARFLAG_UNREMOVABLE, "[%H:%M:%S]");
	//__Console->AddVar("myriad", CONSOLE_VARTYPE_BOOL, 0, &bGameMod);
	
    
	char t[64];
	for(int i=0; i != 16; i++) 
	{
		sprintf(t, "gamemode%u", i);
		__Console->AddStringVar(t, 0, "");
	}
	
	__Console->Execute("exec server");

	if (!strcmp( __Console->GetStringVar("rcon_password"), "changeme" ))
	{
		logprintf("Error: Your password must be changed from the default password, please change it.");
		return 0;
	}

	__Console->ModifyVarFlags("maxplayers", CONSOLE_VARFLAG_READONLY | CONSOLE_VARFLAG_UNREMOVABLE);
	__Console->ModifyVarFlags("bind", CONSOLE_VARFLAG_READONLY | CONSOLE_VARFLAG_UNREMOVABLE);
	__Console->ModifyVarFlags("port", CONSOLE_VARFLAG_READONLY | CONSOLE_VARFLAG_UNREMOVABLE);
	__Console->ModifyVarFlags("rcon_bind", CONSOLE_VARFLAG_READONLY | CONSOLE_VARFLAG_UNREMOVABLE);
	__Console->ModifyVarFlags("rcon_port", CONSOLE_VARFLAG_READONLY | CONSOLE_VARFLAG_UNREMOVABLE);
	__Console->ModifyVarFlags("filterscripts", CONSOLE_VARFLAG_READONLY | CONSOLE_VARFLAG_UNREMOVABLE);
	__Console->ModifyVarFlags("plugins", CONSOLE_VARFLAG_READONLY | CONSOLE_VARFLAG_UNREMOVABLE);
	__Console->ModifyVarFlags("nosign", CONSOLE_VARFLAG_READONLY | CONSOLE_VARFLAG_UNREMOVABLE);

	__Console->ModifyVarFlags("onfoot_rate", CONSOLE_VARFLAG_READONLY | CONSOLE_VARFLAG_UNREMOVABLE);
	__Console->ModifyVarFlags("incar_rate", CONSOLE_VARFLAG_READONLY | CONSOLE_VARFLAG_UNREMOVABLE);
	__Console->ModifyVarFlags("weapon_rate", CONSOLE_VARFLAG_READONLY | CONSOLE_VARFLAG_UNREMOVABLE);

	/*	Open SA:MP	*/
	char* verStr = new char[strlen(SAMP_VERSION) + 1];
	strcpy(verStr, SAMP_VERSION);
	for(uint8_t i=0; i < strlen(SAMP_VERSION); i++)
		if(verStr[i] == 'O') verStr[i-1] = '\0';

	__Console->AddStringVar("version", CONSOLE_VARFLAG_RULE | CONSOLE_VARFLAG_READONLY | CONSOLE_VARFLAG_UNREMOVABLE, verStr);
	delete [] verStr;
	/*				*/

#ifdef WIN32
	SetConsoleCtrlHandler(CtrlHandler, TRUE);
	hConsoleExecuteEvent = CreateEvent(NULL, TRUE, FALSE, NULL);
	DWORD dwThreadId;
	HANDLE hThread = CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)ConsoleInputThread, NULL, 0, &dwThreadId);
	
	SetUnhandledExceptionFilter(exc_handler);
	timeBeginPeriod(1);
#else
	pthread_t hThread;
	if(bInputEnable)
	{
		pthread_create(&hThread, NULL, ConsoleInputThread, NULL);
		pthread_mutex_lock(&hConsoleExecuteMutex);
		pthread_cond_broadcast(&hConsoleExecuteEvent);
		pthread_mutex_unlock(&hConsoleExecuteMutex);
	}
#endif

	__Plugins = new CPlugins();
	__Plugins->LoadPlugins("plugins");

	__NetGame = new CNetGame();
	__NetGame->Init(true);

	__ElementFactory = new CElementFactory();

	
			logprintf ( "[LOLOL]-> 0x%X", RGBA_HEX ( 0, 0, 0, 255 ) );
			
		

	char* szBindAddress = __Console->GetStringVar("rcon_bind");
	if (!szBindAddress || szBindAddress[0] == 0)
		szBindAddress = __Console->GetStringVar("bind");
	if (!szBindAddress || szBindAddress[0] == 0)
		szBindAddress = NULL;

	srand((unsigned int)time(NULL));

	while (!quitProcess)
	{
		__NetGame->Process();

		if(isGamemodeFinished) 
		{
			__NetGame->ShutdownForGameModeRestart();
			isGamemodeFinished = FALSE;
		}

		#ifdef WIN32
			SetEvent(hConsoleExecuteEvent);
			WaitForSingleObject(hConsoleExecuteEvent, INFINITE);
		#else
		if(bInputEnable)
			pthread_cond_broadcast(&hConsoleExecuteEvent);
		#endif

		SLEEP(iServerSleepTimer);		
	}

	delete __ElementFactory;

	delete __NetGame;

	delete __Plugins;

	#ifdef WIN32
		TerminateThread(hThread, 0);
		CloseHandle(hConsoleExecuteEvent);
	#else
	if(bInputEnable)
	{
		pthread_cancel(hThread);
		pthread_cond_destroy(&hConsoleExecuteEvent);
		pthread_mutex_destroy(&hConsoleExecuteMutex);
	}
	#endif

	delete __Console;

	fclose(pLogFile);

	return 0;
}

void StartServer()
{
	Start();
}

#else

PLUGIN_EXPORT unsigned int PLUGIN_CALL Supports() 
{
	return SUPPORTS_VERSION | SUPPORTS_AMX_NATIVES;
}

PLUGIN_EXPORT bool PLUGIN_CALL Load( void **ppData ) 
{
	pAMXFunctions = ppData[PLUGIN_DATA_AMX_EXPORTS];
	logprintf = (logprintf_t)ppData[PLUGIN_DATA_LOGPRINTF];
	GetNetGame = (getNetGame_t)ppData[0xE1];
	GetConsole = (getConsole_t)ppData[0xE4];

	__Console = GetConsole();

	logprintf( "WE GONNA KILL YOU" );
	
	//uint32_t l_uint32_OldProtect = 0;
 //   VirtualProtect ( ( LPVOID )0x004A0526, 4, PAGE_READWRITE, &l_uint32_OldProtect );


	///* Seulement pour tester quelques petits truc ;) */
	//*( uint32_t* )0x4A0526 = ( uint32_t ) RPC_ClientJoin;

	__PickupPool = new CPickupPool();
	__GangZonePool = new CGangZonePool();
	__NetGame->objectPool = new CObjectPool();
	__TextDrawPool = new CTextDrawPool();
	__MenuPool = new CMenuPool( );
	

	/***
	*	HOOKING PARTY =D
	*
	*/
	/**
	 *	Hook Script.
	 */
	HookFunctionCall ( 0x004807B7, ( uint32_t )amx_CustomInit );
	HookFunctionCall ( 0x00480902, ( uint32_t )amx_CustomInit );
	HookFunctionCall ( 0x00483E7F, ( uint32_t )amx_CustomInit );


	/*******************************
		Animation name dumping script


	
	FILE* fichier = fopen( "animations.txt", "w" );

	fprintf( fichier, "char t_AnimationsName[ 1811 ][ 36 ] = {\n" );

	for( uint32_t i = 0; i < 1811;  )
	{
		fprintf( fichier, " \"%s\",", (char*)( 0x4D507C + i * 36 ) ); i++;
		fprintf( fichier, " \"%s\",", (char*)( 0x4D507C + i * 36 ) ); i++;
		fprintf( fichier, " \"%s\",", (char*)( 0x4D507C + i * 36 ) ); i++;
		fprintf( fichier, " \"%s\",", (char*)( 0x4D507C + i * 36 ) ); i++;
		fprintf( fichier, " \"%s\",\n", (char*)( 0x4D507C + i * 36 ) ); i++;
		
	}

	fprintf( fichier, "\n};" );

	fclose( fichier );
	*/

	/*******************************
			DETOURNEMENT SCRIPT
	for ( int i = 0; i < 350; i++ )
	{
		try 
		{
			
			FILE* __File = fopen ( "define.txt", "a" );
			if ( __File )
			{
				fprintf ( __File, "#define FUNC_%s\t\t\t\t\t0x%.8X\n", __NativeList[ i ].name, __NativeList[ i ].func );
				//fprintf ( __File, "#define FUNC_%s\t\t\t\t\t0x00000000\n", __AmxScriptNative[ i ].Name );
				fclose ( __File );
			}

			
			__File = fopen ( "extern_h.txt", "a" );
			if ( __File )
			{
				//printf ( "extern cell ( __cdecl* _%s )( AMX* a_AmxInterface, cell* a_Params );\n", __AmxScriptNative[ i ].funName );
				fprintf ( __File, "extern cell ( __cdecl* _func%s )( AMX* a_AmxInterface, cell* a_Params );\n", __NativeList[ i ].name );
				fclose ( __File );
			}

			__File = fopen ( "proto_h.txt", "a" );
			if ( __File )
			{
				//printf ( "cell AMX_NATIVE_CALL %s ( AMX* a_AmxInterface, cell* a_Params );\n", __AmxScriptNative[ i ].funName );
				fprintf ( __File, "cell AMX_NATIVE_CALL func%s ( AMX* a_AmxInterface, cell* a_Params );\n", __NativeList[ i ].name );
				fclose ( __File );
			}

			__File = fopen ( "proto_c.txt", "a" );
			if ( __File )
			{
				//printf ( "cell ( __cdecl* _%s )( AMX* a_AmxInterface, cell* a_Params ) = ( cell ( __cdecl* )( AMX*, cell* ) )FUNC_%s;\n", __AmxScriptNative[ i ].funName, __AmxScriptNative[ i ].Name );
				fprintf ( __File, "cell ( __cdecl* _func%s )( AMX* a_AmxInterface, cell* a_Params ) = ( cell ( __cdecl* )( AMX*, cell* ) )FUNC_%s;\n", __NativeList[ i ].name, __NativeList[ i ].name );
				fclose ( __File );
			}

			__File = fopen ( "definition_c.txt", "a" );
			if ( __File )
			{
				//printf ( "cell ( __cdecl* _%s )( AMX* a_AmxInterface, cell* a_Params ) = ( cell ( __cdecl* )( AMX*, cell* ) )FUNC_%s;\n", __AmxScriptNative[ i ].funName, __AmxScriptNative[ i ].Name );
			
				fprintf ( __File, "cell AMX_NATIVE_CALL func%s ( AMX* a_AmxInterface, cell* a_Params )\n", __NativeList[ i ].name );
				fprintf ( __File, "{\n" );
				fprintf ( __File, "\tlogprintf ( \"[Call]-> func%s()\" );\n", __NativeList[ i ].name );
				fprintf ( __File, "\treturn _func%s ( a_AmxInterface, a_Params );\n", __NativeList[ i ].name );
				fprintf ( __File, "}\n" );
				fclose ( __File );
			}

			__File = fopen ( "array_c.txt", "a" );
			if ( __File )
			{
				//printf ( "cell ( __cdecl* _%s )( AMX* a_AmxInterface, cell* a_Params ) = ( cell ( __cdecl* )( AMX*, cell* ) )FUNC_%s;\n", __AmxScriptNative[ i ].funName, __AmxScriptNative[ i ].Name );
			
				fprintf ( __File, "{ \"%s\",\t\t\t\t\tfunc%s },\t\t\t\t\t// %d\n", __NativeList[ i ].name, __NativeList[ i ].name, i );
				
				fclose ( __File );
			}


			//logprintf ( "Function: %s", __NativeList[ i ].name );
		}
		catch ( ... )
		{

		}
	}

	*******************/
	//*( uint8_t* )( 0x00404D30 ) = 0xE9;
    //*( uint32_t* )( 0x00404D30 + 0x01 ) = ( ( uint32_t )Custom_Amx_Register ) - ( 0x00404D30 + 5 );

	//*( uint8_t* )( 0x00404D30 + 6 ) = 0xC3;

	//memcpy ( ( void* )( __NetGame + 16 ), __PickupPool, 4 );
	//__NetGamePickupPool = __PickupPool;
/*
	uint32_t l_uint32_OldProtect = 0;
    VirtualProtect ( ( LPVOID )0x00484AF9, 5, PAGE_READWRITE, &l_uint32_OldProtect );

	*( uint8_t* )( 0x00484AF9 ) = 0xE9;
    *( uint32_t* )( 0x00484AF9 + 0x01 ) = ( uint32_t )CPickupPool__New - ( 0x00484AF9 + 5 );
/*
	
    VirtualProtect ( ( LPVOID )0x00484AF9, 5, PAGE_READWRITE, &l_uint32_OldProtect );
	*( uint8_t* )( 0x00484B59 ) = 0xE9;
    *( uint32_t* )( 0x00484B59 + 0x01 ) = ( uint32_t )CPickupPool__New - ( 0x00484B59 + 5 );
*/
	return true;
}

PLUGIN_EXPORT void PLUGIN_CALL Unload( )
{
	if ( __PickupPool )
		delete __PickupPool;

	if ( __NetGame->objectPool )
		delete __NetGame->objectPool;

	if ( __GangZonePool )
		delete __GangZonePool;

	if( __MenuPool )
		delete __MenuPool;

	logprintf( "Plugin helloworld.dll got unloaded." );
}


PLUGIN_EXPORT int PLUGIN_CALL AmxLoad( AMX *amx ) 
{
	if(!__NetGame) __NetGame = GetNetGame();
	//__NetGame = (CNetGame*)( 0x4F6270 );
	return 1;//amx_Register( amx, HelloWorldNatives, -1 );
}

PLUGIN_EXPORT int PLUGIN_CALL AmxUnload( AMX *amx ) 
{
	return AMX_ERR_NONE;
}

#endif
